code: public void onConnected() {
          ConnectionState event = null;
          synchronized (this) {
              if (this.state != ConnectionState.CONNECTING) {
                  LOG.debug("Unable to set to connected, not in CONNECTING state: {}", this.state);
                  return;
              }
  
              this.state = ConnectionState.CONNECTED;
              inputAvailable = false; // cannot read (yet)
              outputAvailable = true; // write allowed
              event = this.state;
          }
          notifyStateListeners(event);
      }
docs: WebSocket has successfully upgraded, but the end-user onOpen call hasn't run yet.
  <p>
  This is an intermediate state between the RFC's {@link ConnectionState#CONNECTING} and {@link ConnectionState#OPEN}