fix(lint): automated linting, with simple formatter.

This commit is contained in:
Houmgaor
2025-10-19 22:43:05 +02:00
parent f79e05c0c9
commit 1398383a8d
12 changed files with 84 additions and 104 deletions

View File

@@ -281,12 +281,10 @@ func (s *Server) manageSessions() {
}
func (s *Server) invalidateSessions() {
for {
if s.isShuttingDown {
break
}
for !s.isShuttingDown {
for _, sess := range s.sessions {
if time.Now().Sub(sess.lastPacket) > time.Second*time.Duration(30) {
if time.Since(sess.lastPacket) > time.Second*time.Duration(30) {
s.logger.Info("session timeout", zap.String("Name", sess.Name))
logoutPlayer(sess)
}