message: Don't bother waiting for disconnect() callbacks. Expire timers immediately
diff: @@ -100,7 +100,18 @@ ConnectionInstance.prototype.disconnect = function(reason) {
  );
  this.dead = true;
  - let notifyDisconnect = () => {
  + return new Promise((resolve, reject) => {
  + // close the connection
  + this.client.disconnect(reason);
  + // remove timers
  + if (this._pingRateTimerId) {
  + clearTimeout(this._pingRateTimerId);
  + this._pingRateTimerId = null;
  + }
  + if (this._clientSidePingTimeoutTimerId) {
  + clearTimeout(this._clientSidePingTimeoutTimerId);
  + this._clientSidePingTimeoutTimerId = null;
  + }
  if (this.state !== "connected") {
  // we never resolved this defer, so reject it.
  this._connectDefer.reject(new Error(reason));
  @@ -111,41 +122,10 @@ ConnectionInstance.prototype.disconnect = function(reason) {
  // call this now it would potentially invoke this 3 times (once per
  // connection instance!). Each time would have dead=false as they are
  // separate objects.
  - if (this._pingRateTimerId) {
  - clearTimeout(this._pingRateTimerId);
  - }
  - if (this._clientSidePingTimeoutTimerId) {
  - clearTimeout(this._clientSidePingTimeoutTimerId);
  - }
  this.onDisconnect();
  }
  - };
  -
  - return new Promise((resolve, reject) => {
  - let timedOut = false;
  - let disconnectTimerId = setTimeout(() => {
  - log.error(
  - "%s@%s Timed out waiting for disconnect callback",
  - this.nick, this.domain
  - );
  - timedOut = true;
  - notifyDisconnect();
  - reject(new Error("Timed out when calling client.disconnect()"));
  - }, 1000);
  -
  - this.client.disconnect(reason, () => {
  - if (timedOut) {
  - log.error(
  - "%s@%s disconnect callback invoked too late",
  - this.nick, this.domain
  - );
  - return;
  - }
  - notifyDisconnect();
  - clearTimeout(disconnectTimerId);
  resolve();
  });
  - });
  };
  ConnectionInstance.prototype.addListener = function(eventName, fn) {
  