summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv4')
-rw-r--r--dhcpv4/server.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/dhcpv4/server.go b/dhcpv4/server.go
index 7db4abe..94e4578 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)
@@ -128,7 +131,7 @@ func (s *Server) ActivateAndServe() error {
log.Printf("Error parsing DHCPv4 request: %v", err)
continue
}
- s.Handler(pc, peer, m)
+ go s.Handler(pc, peer, m)
}
return nil
}