[jetty-users] WebSocketGeneratorRFC6455.closeOut doesn't send reason when code < 0
When a connection is closed with a message and closeCode <= 0, the message is not sent at all. This is because of the test in line 382 of WebSocketGeneratorRFC6455.java:
reason: "reason for closure"
Instead, reason is "". If this is intended behavior, I think the Javadoc needs some elaboration; it reads:
public void close(int closeCode, String message)
Close the connection with specific closeCode and message.
closeCode - The close code to send, or -1 for no close code
message - The message to send or null for no message
As implemented, message is never sent unless closeCode > 0.