Issue #4747 - Default close status code should be normal status

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2020-04-06 07:48:14 +10:00
parent 9b57fcd8ee
commit 664cb81e6d
2 changed files with 2 additions and 2 deletions

View File

@ -179,7 +179,7 @@ public class JavaxWebSocketSession implements javax.websocket.Session
@Override
public void close()
{
close(new CloseReason(CloseReason.CloseCodes.NO_STATUS_CODE, null));
close(new CloseReason(CloseReason.CloseCodes.NORMAL_CLOSURE, null));
}
/**

View File

@ -146,7 +146,7 @@ public class JettySpecificConfigTest
// Close the Session.
session.close();
assertTrue(clientEndpoint.closeLatch.await(5, TimeUnit.SECONDS));
assertThat(clientEndpoint.closeReason.getCloseCode(), is(CloseReason.CloseCodes.NO_STATUS_CODE));
assertThat(clientEndpoint.closeReason.getCloseCode(), is(CloseReason.CloseCodes.NORMAL_CLOSURE));
assertNull(clientEndpoint.error);
}
}