test: allow lightningNetworkWatcher to gracefully exit when ntfn pending

This commit is contained in:
Olaoluwa Osuntokun 2017-04-20 16:06:35 -07:00
parent 994a3c10ca
commit 2f08337ccd
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2

@ -397,7 +397,11 @@ func (l *lightningNode) lightningNetworkWatcher() {
panic(fmt.Errorf("unable read update ntfn: %v", err)) panic(fmt.Errorf("unable read update ntfn: %v", err))
} }
graphUpdates <- update select {
case graphUpdates <- update:
case <-l.quit:
return
}
} }
}() }()