Skip to content

Commit

Permalink
check channel close in listenNKN
Browse files Browse the repository at this point in the history
Signed-off-by: Yilun <[email protected]>
  • Loading branch information
yilunzhang committed Nov 19, 2024
1 parent 3e6e2ef commit f6231de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit f6231de

Please sign in to comment.