Skip to content

Commit

Permalink
stop listen if closed
Browse files Browse the repository at this point in the history
Signed-off-by: Yilun <[email protected]>
  • Loading branch information
yilunzhang committed Nov 20, 2024
1 parent f6231de commit ec9e3ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,9 @@ func (c *TunaSessionClient) listenNet(i int) {
for {
netConn, err := c.listeners[i].Accept()
if err != nil {
if c.IsClosed() {
return
}
log.Printf("Accept connection error: %v", err)
time.Sleep(time.Second)
continue
Expand Down

0 comments on commit ec9e3ee

Please sign in to comment.