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