mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-30 06:28:31 +00:00
Fix panic sending on closed client.MessageChannel
This commit is contained in:
parent
601b5501a7
commit
33bf762a00
3 changed files with 35 additions and 22 deletions
|
@ -247,6 +247,10 @@ RunLoop:
|
|||
// Stop getting messages...
|
||||
UnsubscribeAll(&client)
|
||||
|
||||
client.MsgChannelKeepalive.Lock()
|
||||
client.MessageChannel = nil
|
||||
client.MsgChannelKeepalive.Unlock()
|
||||
|
||||
// And finished.
|
||||
// Close the channel so the draining goroutine can finish, too.
|
||||
close(_serverMessageChan)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue