mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-24 16:43:37 +01:00
fix(lint): automated linting, with simple formatter.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user