Skip to content

Commit

Permalink
+2
Browse files Browse the repository at this point in the history
  • Loading branch information
jin committed Jan 28, 2024
1 parent d80d84d commit 3162bc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions websocket/frame/frame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ namespace $ {
fin = true,
) {

const head = ( size === 127 ? 10 : size === 126 ? 4 : 2 ) + ( mask ? 4 : 0 )
const frame = $mol_websocket_frame.from( head )
const head = ( size >= 2**16 ? 10 : size >= 126 ? 4 : 2 ) + ( mask ? 4 : 0 )
const frame = $mol_websocket_frame.from( head )

frame.kind({ op, fin })
frame.data({ size, mask })
Expand Down

0 comments on commit 3162bc2

Please sign in to comment.