code: function connectIfNeeded() {
        // console.log('re-establishing the connect');
        websocket = null;
        socketCreationInProcess = false;
  
        // The token may have expired so test for it.
        getToken(determineService())
          .then(() => {
            return processSTTSocketStart(false);
          })
          .then(() => {
            //return Promise.resolve();
            return;
          })
          .catch((err) => {
            //return Promise.resolve();
            return;
          });
      }
docs: If we are going to connect to STT through websockets then its going to disconnect or timeout, so need to handle that occurrence.