mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
chore: migrate to coder/websocket 1.8.12 (#15898)
Migrates us to `coder/websocket` v1.8.12 rather than `nhooyr/websocket` on an older version. Works around https://github.com/coder/websocket/issues/504 by adding an explicit test for `xerrors.Is(err, io.EOF)` where we were previously getting `io.EOF` from the netConn.
This commit is contained in:
@ -268,7 +268,7 @@ const websocketCloseMaxLen = 123
|
||||
func WebsocketCloseSprintf(format string, vars ...any) string {
|
||||
msg := fmt.Sprintf(format, vars...)
|
||||
|
||||
// Cap msg length at 123 bytes. nhooyr/websocket only allows close messages
|
||||
// Cap msg length at 123 bytes. coder/websocket only allows close messages
|
||||
// of this length.
|
||||
if len(msg) > websocketCloseMaxLen {
|
||||
// Trim the string to 123 bytes. If we accidentally cut in the middle of
|
||||
|
Reference in New Issue
Block a user