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
1 changed files with 3 additions and 3 deletions

View File

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