File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -40,12 +40,12 @@ class Framer {
4040
4141 static decode ( client , buf ) {
4242 // Read header
43- if ( this . batchHeader && buf [ 0 ] !== this . batchHeader ) throw Error ( `bad batch packet header, received: ${ buf [ 0 ] } , expected: ${ this . batchHeader } ` )
44- const buffer = buf . slice ( this . batchHeader ? 1 : 0 )
43+ if ( client . batchHeader && buf [ 0 ] !== client . batchHeader ) throw Error ( `bad batch packet header, received: ${ buf [ 0 ] } , expected: ${ client . batchHeader } ` )
44+ const buffer = buf . slice ( client . batchHeader ? 1 : 0 )
4545 // Decompress
4646 let decompressed
4747 if ( client . features . compressorInHeader && client . compressionReady ) {
48- decompressed = this . decompress ( buf [ 0 ] , buffer . slice ( 1 ) )
48+ decompressed = this . decompress ( buffer [ 0 ] , buffer . slice ( 1 ) )
4949 } else {
5050 // On old versions, compressor is session-wide ; failing to decompress
5151 // a packet will assume it's not compressed
You can’t perform that action at this time.
0 commit comments