Skip to content

Commit

Permalink
fix(session): fix panic: close of closed channel (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
oiooj authored Feb 2, 2024
1 parent 7be6ef6 commit c8d7ec9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions api_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package pyroscope

import (
"testing"
)

func TestProfilerStartStop(t *testing.T) {
profiler, err := Start(Config{
ApplicationName: "test",
})
if err != nil {
t.Fatal(err)
}
profiler.Stop()
}
1 change: 1 addition & 0 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ func (ps *Session) takeSnapshots() {
if ps.isCPUEnabled() {
ps.cpu.Stop()
}
return
}
}
}
Expand Down

0 comments on commit c8d7ec9

Please sign in to comment.