1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-11 00:20:54 +00:00

Close server on SIGUSR1, 'kickclients' for rebalancing

This commit is contained in:
Kane York 2015-11-19 17:49:48 -08:00
parent 62c9659430
commit 38972364fb
3 changed files with 93 additions and 6 deletions

View file

@ -105,6 +105,10 @@ func UnsubscribeSingleChat(client *ClientInfo, channelName string) {
// - write lock to SubscriptionInfos
// - write lock to ClientInfo
func UnsubscribeAll(client *ClientInfo) {
if StopAcceptingConnections {
return // no need to remove from a high-contention list when the server is closing
}
client.Mutex.Lock()
client.PendingSubscriptionsBacklog = nil
client.PendingSubscriptionsBacklog = nil