diff --git a/client.go b/client.go index c98148c..bcf49cf 100644 --- a/client.go +++ b/client.go @@ -359,7 +359,10 @@ func (c *TunaSessionClient) GetPubAddrs() *PubAddrs { func (c *TunaSessionClient) listenNKN() { for { - msg := <-c.multiClient.OnMessage.C + msg, ok := <-c.multiClient.OnMessage.C + if !ok { + return + } if !c.shouldAcceptAddr(msg.Src) { continue }