mirror of
https://github.com/fosrl/newt.git
synced 2026-02-25 14:26:40 +00:00
Dont throw errors on cleanup
This commit is contained in:
@@ -3,6 +3,7 @@ package wgtester
|
|||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io"
|
||||||
"net"
|
"net"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
@@ -187,6 +188,10 @@ func (s *Server) handleConnections() {
|
|||||||
case <-s.shutdownCh:
|
case <-s.shutdownCh:
|
||||||
return // Don't log error if we're shutting down
|
return // Don't log error if we're shutting down
|
||||||
default:
|
default:
|
||||||
|
// Don't log EOF errors during shutdown - these are expected when connection is closed
|
||||||
|
if err == io.EOF {
|
||||||
|
return
|
||||||
|
}
|
||||||
logger.Error("%sError reading from UDP: %v", s.outputPrefix, err)
|
logger.Error("%sError reading from UDP: %v", s.outputPrefix, err)
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user