Dont throw errors on cleanup

Former-commit-id: d04f6cf702
This commit is contained in:
Owen
2025-11-30 19:45:25 -05:00
parent a97a8c4b0e
commit 12cbb78a68

View File

@@ -3,6 +3,7 @@ package wgtester
import (
"encoding/binary"
"fmt"
"io"
"net"
"sync"
"time"
@@ -187,6 +188,10 @@ func (s *Server) handleConnections() {
case <-s.shutdownCh:
return // Don't log error if we're shutting down
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)
}
continue