test: fix double close channel bug by removing wait in lightningNode.stop()
This commit fixes a panic bug caused by two calls to a process’ cmd.Wait() method. If two nodes incurred a fatal error as soon as they were created, then both the goroutine detected to recovering the stderr data and the defer statement would case a double channel close due to the simultaneous calls to Wait().
This commit is contained in:
parent
517255fdb1
commit
a7b7f4f272
@ -260,8 +260,6 @@ func (l *lightningNode) stop() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
defer l.cmd.Wait()
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
return l.cmd.Process.Signal(os.Kill)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user