forked from External/ergo
fix data race on exitedSnomaskSent
This commit is contained in:
parent
1a7169d75d
commit
5ac7ea5b1c
3 changed files with 11 additions and 4 deletions
|
|
@ -987,6 +987,7 @@ func (client *Client) destroy(session *Session) {
|
|||
// if it's our job to destroy it, don't let anyone else try
|
||||
client.destroyed = true
|
||||
}
|
||||
exitedSnomaskSent := client.exitedSnomaskSent
|
||||
client.stateMutex.Unlock()
|
||||
|
||||
// destroy all applicable sessions:
|
||||
|
|
@ -1101,7 +1102,7 @@ func (client *Client) destroy(session *Session) {
|
|||
friend.sendFromClientInternal(false, splitQuitMessage.Time, splitQuitMessage.Msgid, details.nickMask, details.accountName, nil, "QUIT", quitMessage)
|
||||
}
|
||||
|
||||
if !client.exitedSnomaskSent && registered {
|
||||
if !exitedSnomaskSent && registered {
|
||||
client.server.snomasks.Send(sno.LocalQuits, fmt.Sprintf(ircfmt.Unescape("%s$r exited the network"), details.nick))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue