code: @Override
    public void onFailure(WebSocket webSocket, Throwable t, Response response) {
      socketOpen = false;
      if (t instanceof Exception) {
        callback.onError((Exception) t);
      } else {
        callback.onError(new Exception(t));
      }
    }
docs: /*
  (non-Javadoc)
  @see okhttp3.WebSocketListener#onFailure(okhttp3.WebSocket, java.lang.Throwable, okhttp3.Response)