this._socket.on('close', hadError => {
        // if we did the disconnection then all good
        if (STATE.DISCONNECTING === this._state) {
          return;
        }