Use os.IsTimeout instead of os.ErrDeadlineExceeded

This fixes compilation with Go 1.13 and 1.14.
This commit is contained in:
Juliusz Chroboczek
2021-04-22 16:19:07 +02:00
committed by Sean DuBois
parent e6e49f59b0
commit 894452d0c3
2 changed files with 2 additions and 2 deletions

View File

@@ -63,6 +63,7 @@ Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contribu
* [Antoine Baché](https://github.com/Antonito) * [Antoine Baché](https://github.com/Antonito)
* [Will Forcey](https://github.com/wawesomeNOGUI) * [Will Forcey](https://github.com/wawesomeNOGUI)
* [David Zhao](https://github.com/davidzhao) * [David Zhao](https://github.com/davidzhao)
* [Juliusz Chroboczek](https://github.com/jech)
### License ### License
MIT License - see [LICENSE](LICENSE) for full text MIT License - see [LICENSE](LICENSE) for full text

View File

@@ -1,7 +1,6 @@
package ice package ice
import ( import (
"errors"
"io" "io"
"net" "net"
"os" "os"
@@ -213,7 +212,7 @@ func (m *UDPMuxDefault) connWorker() {
if m.IsClosed() { if m.IsClosed() {
return return
} else if err != nil { } else if err != nil {
if errors.Is(err, os.ErrDeadlineExceeded) { if os.IsTimeout(err) {
continue continue
} else if err != io.EOF { } else if err != io.EOF {
logger.Errorf("could not read udp packet: %v", err) logger.Errorf("could not read udp packet: %v", err)