Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak committed Apr 10, 2024
1 parent 76c1ec4 commit 2df1bb3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/web/websocket/receiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,9 @@ class ByteParser extends Writable {
// defined as the status code (Section 7.4) contained in the first Close
// control frame received by the application
code = data.readUInt16BE(0)
}

if (code !== undefined && !isValidStatusCode(code)) {
return null
if (!isValidStatusCode(code)) {
return null
}
}

// https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6
Expand Down

0 comments on commit 2df1bb3

Please sign in to comment.