We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ec5964 commit 1482ef6Copy full SHA for 1482ef6
p2p/transport/webrtc/udpmux/mux.go
@@ -5,6 +5,7 @@ package udpmux
5
import (
6
"bytes"
7
"context"
8
+ "errors"
9
"fmt"
10
"io"
11
"net"
@@ -143,7 +144,7 @@ func (mux *UDPMux) readLoop() {
143
144
145
n, addr, err := mux.socket.ReadFrom(buf)
146
if err != nil {
- if strings.Contains(err.Error(), "use of closed network connection") {
147
+ if strings.Contains(err.Error(), "use of closed network connection") || errors.Is(err, context.Canceled) {
148
log.Debugf("readLoop exiting: socket %s closed", mux.socket.LocalAddr())
149
} else {
150
log.Errorf("error reading from socket %s: %v", mux.socket.LocalAddr(), err)
0 commit comments