code: function ()
      {
          if (typeof this._idleTimeout == "number") {
              clearTimeout(this._idleTimeout);
          }
  
          // Cancel Disconnect Timeout
          if (this._disconnectTimeout !== null) {
              this.deleteTimedHandler(this._disconnectTimeout);
              this._disconnectTimeout = null;
          }
  
          Strophe.info("_doDisconnect was called");
          this._proto._doDisconnect();
  
          this.authenticated = false;
          this.disconnecting = false;
  
          // delete handlers
          this.handlers = [];
          this.timedHandlers = [];
          this.removeTimeds = [];
          this.removeHandlers = [];
          this.addTimeds = [];
          this.addHandlers = [];
  
          // tell the parent we disconnected
          this._changeConnectStatus(Strophe.Status.DISCONNECTED, null);
          this.connected = false;
      }
docs: PrivateFunction: _doDisconnect
  _Private_ function to disconnect.
  
  This is the last piece of the disconnection logic.  This resets the
  connection and alerts the user's connection callback.