mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 01:36:24 +01:00
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
1 changed files with 0 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue