Skip to content

Commit

Permalink
Manually close conn when mux read fails
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson committed Aug 23, 2024
1 parent f7b2db8 commit 85f4794
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion protocol/czar/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,14 @@ func (c *Client) Run() {
case c.Mux <- mux:
case <-mux.rer.Sig():
log.Println("czar: mux done")
mux.Close()
sid = 0
case <-c.Cancel:
log.Println("czar: mux done")
mux.Close()
sid = 2
}
case 2:
mux.Close()
return
}
}
Expand Down

0 comments on commit 85f4794

Please sign in to comment.