Skip to content

Commit

Permalink
no need to close channel. fix race at shutdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
fzwoch authored Mar 26, 2024
1 parent 09e754d commit 0bde8af
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ func (s *Sender) SenderAdd(c net.Conn) {
blog(C.LOG_INFO, "disconnect: "+c.RemoteAddr().String())

s.Lock()
close(ch)
delete(s.conns, c)
s.Unlock()
break
Expand Down

0 comments on commit 0bde8af

Please sign in to comment.