1
0
Fork 0
forked from External/ergo

clean up always-on state machine

This commit is contained in:
Shivaram Lingamneni 2020-07-26 15:51:33 -04:00
parent dc90b3c910
commit 027886046c
3 changed files with 7 additions and 25 deletions

View file

@ -1242,7 +1242,9 @@ func (client *Client) destroy(session *Session) {
wasReattach := session != nil && session.client != client
sessionRemoved := false
registered := client.registered
alwaysOn := client.alwaysOn
// XXX a temporary (reattaching) client can be marked alwaysOn when it logs in,
// but then the session attaches to another client and we need to clean it up here
alwaysOn := registered && client.alwaysOn
var remainingSessions int
if session == nil {