mirror of
https://github.com/fosrl/newt.git
synced 2026-03-10 04:36:40 +00:00
Exit well
This commit is contained in:
@@ -119,7 +119,13 @@ func (s *Server) handleConnections() {
|
||||
// Just a timeout, keep going
|
||||
continue
|
||||
}
|
||||
logger.Error(s.outputPrefix+"Error reading from UDP: %v", err)
|
||||
// Check if we're shutting down and the connection was closed
|
||||
select {
|
||||
case <-s.shutdownCh:
|
||||
return // Don't log error if we're shutting down
|
||||
default:
|
||||
logger.Error(s.outputPrefix+"Error reading from UDP: %v", err)
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user