aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node_modules/undici/lib/web/websocket/connection.js
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-10-11 19:00:29 +0500
committerEgor Tensin <egor@tensin.name>2026-10-11 19:00:29 +0500
commit20cbf953d092f8a3d5d4126caea9c3c90b1d6f93 (patch)
treef2f5e770657d5252ef02b0aa417fc03eb9ca83c0 /node_modules/undici/lib/web/websocket/connection.js
parentupdate my email (diff)
downloadcleanup-path-20cbf953d092f8a3d5d4126caea9c3c90b1d6f93.tar.gz
cleanup-path-20cbf953d092f8a3d5d4126caea9c3c90b1d6f93.zip
bump dependencies
Diffstat (limited to 'node_modules/undici/lib/web/websocket/connection.js')
-rw-r--r--node_modules/undici/lib/web/websocket/connection.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/node_modules/undici/lib/web/websocket/connection.js b/node_modules/undici/lib/web/websocket/connection.js
index bb87d36..1197b9b 100644
--- a/node_modules/undici/lib/web/websocket/connection.js
+++ b/node_modules/undici/lib/web/websocket/connection.js
@@ -192,7 +192,7 @@ function establishWebSocketConnection (url, protocols, client, ws, onEstablish,
// is specified, the server needs to include the same field and one of
// the selected subprotocol values in its response for the connection to
// be established.
- if (!requestProtocols.includes(secProtocol)) {
+ if (requestProtocols === null || !requestProtocols.includes(secProtocol)) {
failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.')
return
}