You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// As mentioned in https://github.com/gorilla/websocket/pull/897#issuecomment-1947108098:
337
+
// It's safe to ignore the errors for netconn.Close()
// As mentioned in https://github.com/gorilla/websocket/pull/897#issuecomment-1947108098:
61
+
// It's safe to ignore the errors for conn.Close()
Copy file name to clipboardExpand all lines: server.go
+14-9Lines changed: 14 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ import (
8
8
"bufio"
9
9
"errors"
10
10
"io"
11
+
"log"
11
12
"net/http"
12
13
"net/url"
13
14
"strings"
@@ -179,10 +180,10 @@ func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeade
179
180
}
180
181
181
182
ifbrw.Reader.Buffered() >0 {
182
-
returnnil, errors.Join(
183
-
errors.New("websocket: client sent data before handshake is complete"),
184
-
netConn.Close(),
185
-
)
183
+
// As mentioned in https://github.com/gorilla/websocket/pull/897#issuecomment-1947108098:
184
+
// It's safe to ignore the errors for netconn.Close()
0 commit comments