test: avoid double chan close in integration testing framework
This commit is contained in:
parent
a0c2278a69
commit
610f42ad5a
@ -271,20 +271,20 @@ func (l *lightningNode) Stop() error {
|
||||
// - start of the node wasn't initiated
|
||||
// - process wasn't spawned
|
||||
// - process already finished
|
||||
|
||||
select {
|
||||
case <-l.quit:
|
||||
return nil
|
||||
case <-l.processExit:
|
||||
return nil
|
||||
default:
|
||||
close(l.quit)
|
||||
l.wg.Wait()
|
||||
}
|
||||
|
||||
close(l.quit)
|
||||
if runtime.GOOS == "windows" {
|
||||
return l.cmd.Process.Signal(os.Kill)
|
||||
}
|
||||
return l.cmd.Process.Signal(os.Interrupt)
|
||||
}
|
||||
}
|
||||
|
||||
// Restart attempts to restart a lightning node by shutting it down cleanly,
|
||||
// then restarting the process. This function is fully blocking. Upon restart,
|
||||
|
Loading…
Reference in New Issue
Block a user