summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--dhcpv4/server.go5
-rw-r--r--dhcpv6/server.go5
2 files changed, 8 insertions, 2 deletions
diff --git a/dhcpv4/server.go b/dhcpv4/server.go
index 7db4abe..130ef54 100644
--- a/dhcpv4/server.go
+++ b/dhcpv4/server.go
@@ -115,7 +115,10 @@ func (s *Server) ActivateAndServe() error {
if err != nil {
switch err.(type) {
case net.Error:
- // silently skip and continue
+ if err.(net.Error).Timeout() {
+ return err
+ }
+ // if timeout, silently skip and continue
default:
// complain and continue
log.Printf("Error reading from packet conn: %v", err)
diff --git a/dhcpv6/server.go b/dhcpv6/server.go
index 3fade87..1dad4be 100644
--- a/dhcpv6/server.go
+++ b/dhcpv6/server.go
@@ -117,7 +117,10 @@ func (s *Server) ActivateAndServe() error {
if err != nil {
switch err.(type) {
case net.Error:
- // silently skip and continue
+ if !err.(net.Error).Timeout() {
+ return err
+ }
+ // if timeout, silently skip and continue
default:
//complain and continue
log.Printf("Error reading from packet conn: %v", err)