* Fixes #613

* use net.Error interface for detecting temporary errors
This commit is contained in:
Twitch 2018-01-07 03:01:19 +11:00 committed by Miek Gieben
parent afd3e95dbb
commit ac8cd7878c
1 changed files with 4 additions and 1 deletions

View File

@ -509,7 +509,10 @@ func (srv *Server) serveUDP(l *net.UDPConn) error {
}
srv.lock.RUnlock()
if err != nil {
continue
if netErr, ok := err.(net.Error); ok && netErr.Temporary() {
continue
}
return err
}
go srv.serve(s.RemoteAddr(), handler, m, l, s, nil)
}