code: function (status, condition)
      {
          // notify all plugins listening for status changes
          for (var k in Strophe._connectionPlugins) {
              if (Strophe._connectionPlugins.hasOwnProperty(k)) {
                  var plugin = this[k];
                  if (plugin.statusChanged) {
                      try {
                          plugin.statusChanged(status, condition);
                      } catch (err) {
                          Strophe.error("" + k + " plugin caused an exception " +
                                        "changing status: " + err);
                      }
                  }
              }
          }
  
          // notify the user's callback
          if (this.connect_callback) {
              try {
                  this.connect_callback(status, condition);
              } catch (e) {
                  Strophe.error("User connection callback caused an " +
                                "exception: " + e);
              }
          }
      }
docs: PrivateFunction: _changeConnectStatus
  _Private_ helper function that makes sure plugins and the user's
  callback are notified of connection status changes.
  
  Parameters:
  (Integer) status - the new connection status, one of the values
  in Strophe.Status
  (String) condition - the error condition or null