async _closeSocket(timeout = this.timeout) {
    this._status("disconnecting");
    this.socket.end();

    // The 'disconnect' status is set by the socket 'close' listener
    await promise(this.socket, "close", "error", timeout);
  }
Disconnects the socket
https://xmpp.org/rfcs/rfc6120.html#streams-close
https://tools.ietf.org/html/rfc7395#section-3.6