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 committed 2016-10-23 19:27:32 -07:00
1 parent 517255fdb1
commit a7b7f4f272
1 file changed
-2
-2
View File
@@ -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)
}