mirror of
https://github.com/ergochat/ergo.git
synced 2026-01-09 20:02:07 -08:00
channel: Kill a race condition that locked up the server.
Specifically, if you joined a channel while someone else was trying to part. the Join method would grab the lock, the Quit method would queue to grab the lock, the Join method would unlock and then try to regrab the lock, and it would get into a situation where nobody would have the lock and everyone would be waiting for it. This caused weird oddities with clients.
This commit is contained in:
parent
cec3416eae
commit
300d02bd9c
2 changed files with 12 additions and 13 deletions
|
|
@ -482,7 +482,7 @@ func (client *Client) destroy() {
|
|||
|
||||
// clean up channels
|
||||
for channel := range client.channels {
|
||||
channel.Quit(client)
|
||||
channel.Quit(client, &friends)
|
||||
}
|
||||
|
||||
// clean up server
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue