mirror of
https://github.com/pion/ice.git
synced 2025-10-25 08:20:37 +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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user