code: @Override
      public void close() {
          status = Socket.STATUS.CLOSE;
          if (closed.getAndSet(true)) return;
  
          if (options.reconnectTimeoutInMilliseconds() <= 0 && !options.reconnect()) {
              timer.shutdown();
          }
  
          TransportsUtil.invokeFunction(CLOSE, decoders, functions, String.class, CLOSE.name(), CLOSE.name(), resolver);
  
          if (webSocket != null && webSocket.isOpen())
              webSocket.close();
  
          futureDone();
      }
docs: {@inheritDoc}