diff options
author | Andrea Barberio <insomniac@slackware.it> | 2018-11-09 15:44:57 +0000 |
---|---|---|
committer | insomniac <insomniacslk@users.noreply.github.com> | 2018-11-12 09:36:40 +0000 |
commit | b388e716ca28ed5cb186e23a215a32d526d22cd0 (patch) | |
tree | ac7fe172f0c9631df2ed1ba811843bee21b03418 /dhcpv4/server.go | |
parent | 01251f1da16d2734ca8e4fe503ba1c911ade2032 (diff) |
server: do not skip network errors in ActivateAndServe
Diffstat (limited to 'dhcpv4/server.go')
-rw-r--r-- | dhcpv4/server.go | 5 |
1 files changed, 4 insertions, 1 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) |