We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3028e0e commit b967cbaCopy full SHA for b967cba
1 file changed
src/main/java/org/java_websocket/framing/CloseFrameBuilder.java
@@ -68,7 +68,7 @@ private void initCloseCode() throws InvalidFrameException {
68
bb.position( 0 );
69
code = bb.getInt();
70
71
- if( code == CloseFrame.ABNORMAL_CLOSE || code == CloseFrame.TLS_ERROR || code == CloseFrame.NOCODE || code > 4999 ) {
+ if( code == CloseFrame.ABNORMAL_CLOSE || code == CloseFrame.TLS_ERROR || code == CloseFrame.NOCODE || code > 4999 || code < 1000 ) {
72
throw new InvalidFrameException( "closecode must not be sent over the wire " + code );
73
}
74
0 commit comments