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 169cf7d commit 3fdf2f0Copy full SHA for 3fdf2f0
utils/wsutil/conn.go
@@ -6,6 +6,7 @@ import (
6
"context"
7
"io"
8
"net/http"
9
+ "strings"
10
"time"
11
12
"github.com/gorilla/websocket"
@@ -167,6 +168,12 @@ func startReadLoop(conn *websocket.Conn, eventCh chan<- Event) {
167
168
return
169
}
170
171
+ // Is the error an intentional close call? Go 1.16 exposes
172
+ // ErrClosing, but we have to do this for now.
173
+ if strings.HasSuffix(err.Error(), "use of closed network connection") {
174
+ return
175
+ }
176
+
177
// Check if the error is a normal one:
178
if websocket.IsCloseError(err, websocket.CloseNormalClosure) {
179
0 commit comments