mirror of
https://github.com/pion/ice.git
synced 2025-10-18 21:34:40 +08:00
Use os.IsTimeout instead of os.ErrDeadlineExceeded
This fixes compilation with Go 1.13 and 1.14.
This commit is contained in:

committed by
Sean DuBois

parent
e6e49f59b0
commit
894452d0c3
@@ -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
|
||||||
|
@@ -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)
|
||||||
|
Reference in New Issue
Block a user