Skip to content

Commit b45e80c

Browse files
committed
Update src/com/codebutler/android_websockets/HybiParser.java
Fix logic error from the javascript port.
1 parent 620cc90 commit b45e80c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/com/codebutler/android_websockets/HybiParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ private void parseOpcode(byte data) throws ProtocolError {
149149
throw new ProtocolError("Bad opcode");
150150
}
151151

152-
if (FRAGMENTED_OPCODES.contains(mOpcode) && !mFinal) {
152+
if (!FRAGMENTED_OPCODES.contains(mOpcode) && !mFinal) {
153153
throw new ProtocolError("Expected non-final packet");
154154
}
155155

@@ -413,4 +413,4 @@ public byte[] readBytes(int length) throws IOException {
413413
return buffer;
414414
}
415415
}
416-
}
416+
}

0 commit comments

Comments
 (0)