docs: function (bodyWrap)
      {
          var typ = bodyWrap.getAttribute("type");
          var cond, conflict;
          if (typ !== null && typ == "terminate") {
              // an error occurred
              Strophe.error("BOSH-Connection failed: " + cond);
              cond = bodyWrap.getAttribute("condition");
              conflict = bodyWrap.getElementsByTagName("conflict");
              if (cond !== null) {
                  if (cond == "remote-stream-error" && conflict.length > 0) {
                      cond = "conflict";
                  }
                  this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, cond);
              } else {
                  this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "unknown");
              }
              this._conn._doDisconnect();
              return Strophe.Status.CONNFAIL;
          }
  
          // check to make sure we don't overwrite these if _connect_cb is
          // called multiple times in the case of missing stream:features
          if (!this.sid) {
              this.sid = bodyWrap.getAttribute("sid");
          }
          var wind = bodyWrap.getAttribute('requests');
          if (wind) { this.window = parseInt(wind, 10); }
          var hold = bodyWrap.getAttribute('hold');
          if (hold) { this.hold = parseInt(hold, 10); }
          var wait = bodyWrap.getAttribute('wait');
          if (wait) { this.wait = parseInt(wait, 10); }
      }