From a7b7f4f27294515cecd40a9a60aa450462539986 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Sun, 23 Oct 2016 19:22:43 -0700 Subject: [PATCH] test: fix double close channel bug by removing wait in lightningNode.stop() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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(). --- networktest.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/networktest.go b/networktest.go index b350009b1..171c9bb04 100644 --- a/networktest.go +++ b/networktest.go @@ -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) }