From 894452d0c30cb15d3a327945d770094930133eda Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Thu, 22 Apr 2021 16:19:07 +0200 Subject: [PATCH] Use os.IsTimeout instead of os.ErrDeadlineExceeded This fixes compilation with Go 1.13 and 1.14. --- README.md | 1 + udp_mux.go | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a094b56..9118560 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contribu * [Antoine Baché](https://github.com/Antonito) * [Will Forcey](https://github.com/wawesomeNOGUI) * [David Zhao](https://github.com/davidzhao) +* [Juliusz Chroboczek](https://github.com/jech) ### License MIT License - see [LICENSE](LICENSE) for full text diff --git a/udp_mux.go b/udp_mux.go index 34ff236..3e661db 100644 --- a/udp_mux.go +++ b/udp_mux.go @@ -1,7 +1,6 @@ package ice import ( - "errors" "io" "net" "os" @@ -213,7 +212,7 @@ func (m *UDPMuxDefault) connWorker() { if m.IsClosed() { return } else if err != nil { - if errors.Is(err, os.ErrDeadlineExceeded) { + if os.IsTimeout(err) { continue } else if err != io.EOF { logger.Errorf("could not read udp packet: %v", err)