3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00

socket: Fix bad mutex unlock

This commit is contained in:
Daniel Oaks 2017-04-19 08:50:57 +10:00
parent c911ff2bcd
commit 4254672133

View File

@ -180,7 +180,7 @@ func (socket *Socket) RunSocketWriter() {
for _, line := range socket.linesToSend {
sendQBytes += uint64(len(line))
if socket.MaxSendQBytes < sendQBytes {
socket.linesToSendMutex.Unlock()
// don't unlock mutex because this break is just to escape this for loop
break
}
}