Skip to content

Commit 8bdf221

Browse files
committed
minor cleanups
1 parent 899fb7f commit 8bdf221

File tree

1 file changed

+2
-1
lines changed
  • lib/transports/wsver

1 file changed

+2
-1
lines changed

lib/transports/wsver/8.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,11 @@ Parser.prototype.expect = function(what, length, handler) {
366366

367367
Parser.prototype.processPacket = function (data) {
368368
if ((data[0] & 0x70) != 0) this.error('reserved fields not empty');
369-
if ((data[0] & 0x80) == 0x80) this.state.lastFragment = true;
369+
this.state.lastFragment = (data[0] & 0x80) == 0x80;
370370
this.state.masked = (data[1] & 0x80) == 0x80;
371371
var opcode = data[0] & 0xf;
372372
if (opcode == 0) {
373+
// continuation frame
373374
if (this.state.opcode != 1 || this.state.opcode != 2) {
374375
this.error('continuation frame cannot follow current opcode')
375376
return;

0 commit comments

Comments
 (0)