Skip to content

Commit b6ce887

Browse files
committed
1 parent 17d2861 commit b6ce887

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/java_websocket/framing/CloseFrameBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ private void setCodeAndMessage( int code, String m ) throws InvalidDataException
4040
m = "";
4141
}
4242
if( code == CloseFrame.NOCODE ) {
43-
if( !m.isEmpty() ) {
43+
if( 0 < m.length() ) {
4444
throw new InvalidDataException( PROTOCOL_ERROR, "A close frame must have a closecode if it has a reason" );
4545
}
4646
return;// empty payload

0 commit comments

Comments
 (0)