@Override
 public void onWebSocketClose(int statusCode, String reason) {
   LOG.debug("{} onWebSocketClose({},{})", id, statusCode, reason);
   super.onWebSocketClose(statusCode, reason);
   closeCode = statusCode;
   closeMessage.append(reason);
   closeLatch.countDown();
 }
 @Override
 public void onWebSocketClose(int statusCode, String reason) {
   super.onWebSocketClose(statusCode, reason);
   connected = false;
 }
 @Override
 public void onWebSocketConnect(Session session) {
   super.onWebSocketConnect(session);
   openLatch.countDown();
 }