code: function (pres)
      {
          Strophe.info("_sendTerminate was called");
          var body = this._buildBody().attrs({type: "terminate"});
  
          if (pres) {
              body.cnode(pres.tree());
          }
  
          var req = new Strophe.Request(body.tree(),
                                        this._onRequestStateChange.bind(
                                            this, this._conn._dataRecv.bind(this._conn)),
                                        body.tree().getAttribute("rid"));
  
          this._requests.push(req);
          this._throttledRequestHandler();
      }
docs: PrivateFunction: _sendTerminate
  _Private_ function to send initial disconnect sequence.
  
  This is the first step in a graceful disconnect.  It sends
  the BOSH server a terminate body and includes an unavailable
  presence if authentication has completed.