code: public void startWaitForHandshake() {
          if (log.isDebugEnabled()) {
              log.debug("startWaitForHandshake - {}", sessionId);
          }
          // start the handshake checker after maxHandshakeTimeout milliseconds
          if (scheduler != null) {
              try {
                  waitForHandshakeTask = scheduler.schedule(new WaitForHandshakeTask(), new Date(System.currentTimeMillis() + maxHandshakeTimeout));
              } catch (TaskRejectedException e) {
                  log.error("WaitForHandshake task was rejected for {}", sessionId, e);
              }
          }
      }
docs: Start waiting for a valid handshake.