mirror of
https://github.com/go-delve/delve.git
synced 2025-11-02 12:59:01 +08:00
proc: Properly close channels upon process exit
Prevents a lot of goroutines hanging around, especially when running tests.
This commit is contained in:
@ -144,14 +144,8 @@ func TestClientServer_exit(t *testing.T) {
|
||||
t.Fatalf("Expected exit after continue: %v", state)
|
||||
}
|
||||
state, err = c.GetState()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if state.CurrentThread == nil {
|
||||
t.Fatalf("Expected CurrentThread")
|
||||
}
|
||||
if e, a := true, state.Exited; e != a {
|
||||
t.Fatalf("Expected exited %v, got %v", e, a)
|
||||
if err == nil {
|
||||
t.Fatal("Expected error on querying state from exited process")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user