forked from External/ergo
clean up always-on state machine
This commit is contained in:
parent
dc90b3c910
commit
027886046c
3 changed files with 7 additions and 25 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue