X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/c697d13aac49ede1258762b4cf41d9bdcabb4b27..61c272e101b6f0444c7b2a666b0b5e828ba6db03:/hotline/server.go diff --git a/hotline/server.go b/hotline/server.go index 61cd7fa..c5a29ba 100644 --- a/hotline/server.go +++ b/hotline/server.go @@ -278,8 +278,8 @@ func (s *Server) keepaliveHandler() { s.mux.Lock() for _, c := range s.Clients { - *c.IdleTime += idleCheckInterval - if *c.IdleTime > userIdleSeconds && !c.Idle { + c.IdleTime += idleCheckInterval + if c.IdleTime > userIdleSeconds && !c.Idle { c.Idle = true flagBitmap := big.NewInt(int64(binary.BigEndian.Uint16(*c.Flags))) @@ -327,7 +327,6 @@ func (s *Server) NewClientConn(conn net.Conn) *ClientConn { Connection: conn, Server: s, Version: &[]byte{}, - IdleTime: new(int), AutoReply: &[]byte{}, Transfers: make(map[int][]*FileTransfer), Agreed: false, @@ -335,8 +334,6 @@ func (s *Server) NewClientConn(conn net.Conn) *ClientConn { *s.NextGuestID++ ID := *s.NextGuestID - *clientConn.IdleTime = 0 - binary.BigEndian.PutUint16(*clientConn.ID, ID) s.Clients[ID] = clientConn