Increased idle and quit timeouts
This commit is contained in:
parent
2d48faa5c4
commit
e8faa15312
@ -40,7 +40,7 @@ type Client struct {
|
|||||||
func (s *Server) newClient(ircConn *irc.Conn, conn net.Conn) *Client {
|
func (s *Server) newClient(ircConn *irc.Conn, conn net.Conn) *Client {
|
||||||
client := &Client{Conn: ircConn, conn: conn, Server: s}
|
client := &Client{Conn: ircConn, conn: conn, Server: s}
|
||||||
client.authorized = len(s.Config.Password) == 0
|
client.authorized = len(s.Config.Password) == 0
|
||||||
client.idleTimer = time.AfterFunc(time.Minute, client.idle)
|
client.idleTimer = time.AfterFunc(time.Minute*3, client.idle)
|
||||||
client.channels = map[string]*Channel{}
|
client.channels = map[string]*Channel{}
|
||||||
client.UserModeSet = NewUserModeSet()
|
client.UserModeSet = NewUserModeSet()
|
||||||
return client
|
return client
|
||||||
@ -84,7 +84,7 @@ func (c *Client) handleIncoming() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
c.idleTimer.Stop()
|
c.idleTimer.Stop()
|
||||||
c.idleTimer = time.AfterFunc(time.Minute, c.idle)
|
c.idleTimer = time.AfterFunc(time.Minute*3, c.idle)
|
||||||
if c.quitTimer != nil {
|
if c.quitTimer != nil {
|
||||||
c.quitTimer.Stop()
|
c.quitTimer.Stop()
|
||||||
c.quitTimer = nil
|
c.quitTimer = nil
|
||||||
@ -98,7 +98,7 @@ func (c *Client) handleIncoming() {
|
|||||||
|
|
||||||
func (c *Client) idle() {
|
func (c *Client) idle() {
|
||||||
c.Ping()
|
c.Ping()
|
||||||
c.quitTimer = time.AfterFunc(time.Minute, c.quit)
|
c.quitTimer = time.AfterFunc(time.Minute*3, c.quit)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) quit() {
|
func (c *Client) quit() {
|
||||||
|
Loading…
Reference in New Issue
Block a user