public void onClose(NettyResponseFuture<?> future) {
logger.trace("onClose {}");
try {
WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(future);
NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted());
logger.trace("Connection was closed abnormally (that is, with no close frame being sent).");
if (webSocket != null)
webSocket.close(1006, "Connection was closed abnormally (that is, with no close frame being sent).");
} catch (Throwable t) {