Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastien Binet <[email protected]>
  • Loading branch information
egorse and sbinet authored Jan 16, 2024
1 parent 4df9a62 commit d02690e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,9 @@ func (sck *socket) connReaper() {

// Clone the known closed connections to avoid data race
// and remove those under reaper unlocked.
// That would be resoling deadlock from #149 simpler way.
// That should fix the deadlock reported in #149.
cc := append([]*Conn{}, sck.closedConns...) // clone
sck.closedConns = nil
sck.closedConns = sck.closedConns[:0]
sck.reaperCond.L.Unlock()
for _, c := range cc {
sck.rmConn(c)
Expand Down

0 comments on commit d02690e

Please sign in to comment.