Closes from this side with code, and the handler sees that close.
code
@protected void goAway(int code, String reason) { closeEvents(CloseReceived(code, reason)); sendClose(code, reason); }