Skip to content

Commit

Permalink
use rlock for error notification
Browse files Browse the repository at this point in the history
  • Loading branch information
xtaci committed Sep 30, 2020
1 parent 608bd97 commit 1a84985
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sess.go
Original file line number Diff line number Diff line change
Expand Up @@ -858,11 +858,11 @@ func (l *Listener) notifyReadError(err error) {
close(l.chSocketReadError)

// propagate read error to all sessions
l.sessionLock.Lock()
l.sessionLock.RLock()
for _, s := range l.sessions {
s.notifyReadError(err)
}
l.sessionLock.Unlock()
l.sessionLock.RUnlock()
})
}

Expand Down

0 comments on commit 1a84985

Please sign in to comment.