1
0
Fork 0
forked from External/ergo

change "last signoff" tracking to "last seen"

Explicit quit and ping timeout behave the same way,
but reattach after abandoning/losing the previous session
(without the break being detected server-side) is more aggressive
about replaying missed messages, at the cost of potential duplication.
This commit is contained in:
Shivaram Lingamneni 2020-02-27 02:13:31 -05:00
parent e575b6a29f
commit db39608bcb
7 changed files with 78 additions and 91 deletions

View file

@ -65,8 +65,9 @@ func (cmd *Command) Run(server *Server, client *Client, session *Session, msg ir
session.idletimer.Touch()
}
if !exiting && client.registered && !cmd.leaveClientIdle {
client.Active(session)
// TODO: eliminate idletimer entirely in favor of this measurement
if client.registered {
client.Touch(!cmd.leaveClientIdle, session)
}
return exiting