3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 10:42:52 +01:00

move idletimer and fakelag initialization before certfp read

This commit is contained in:
Shivaram Lingamneni 2020-03-22 09:51:36 -04:00
parent 101dc6b0d9
commit f3d64d2859

View File

@ -278,6 +278,9 @@ func (server *Server) RunClient(conn clientConn, proxyLine string) {
}
client.sessions = []*Session{session}
session.idletimer.Initialize(session)
session.resetFakelag()
if conn.Config.TLSConfig != nil {
client.SetMode(modes.TLS, true)
// error is not useful to us here anyways so we can ignore it
@ -535,9 +538,6 @@ func (client *Client) run(session *Session, proxyLine string) {
client.destroy(session)
}()
session.idletimer.Initialize(session)
session.resetFakelag()
isReattach := client.Registered()
if isReattach {
if session.resumeDetails != nil {