diff --git a/networktest.go b/networktest.go index b161ce03..44d3e457 100644 --- a/networktest.go +++ b/networktest.go @@ -397,7 +397,11 @@ func (l *lightningNode) lightningNetworkWatcher() { panic(fmt.Errorf("unable read update ntfn: %v", err)) } - graphUpdates <- update + select { + case graphUpdates <- update: + case <-l.quit: + return + } } }()