mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
commit
8153fb244e
@ -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 {
|
||||
@ -1245,7 +1245,6 @@ func (client *Client) destroy(session *Session) {
|
||||
client.server.stats.Remove(registered, invisible, operator)
|
||||
}
|
||||
|
||||
// do not destroy the client if it has either remaining sessions, or is BRB'ed
|
||||
if !shouldDestroy {
|
||||
return
|
||||
}
|
||||
|
@ -20,8 +20,8 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
handshakeTimeout, _ = time.ParseDuration("5s")
|
||||
errSendQExceeded = errors.New("SendQ exceeded")
|
||||
handshakeTimeout = RegisterTimeout
|
||||
errSendQExceeded = errors.New("SendQ exceeded")
|
||||
|
||||
sendQExceededMessage = []byte("\r\nERROR :SendQ Exceeded\r\n")
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user