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:
Olaoluwa Osuntokun 2016-10-23 19:22:43 -07:00
parent 517255fdb1
commit a7b7f4f272
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2

@ -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)
}