Hook called once when a protocol error, a keepalive timeout or a throwing
hook ends the session, and for a throw from onDisconnect itself. On a
connected MQTT 5.0 session it runs after the wire has handed its
reason-coded DISCONNECT to onSend (or waited closeTimeoutMs for it), so the
hook may close the transport. onDisconnect runs after it. A throw from
this hook is caught and dropped.
Hook called once when a protocol error, a keepalive timeout or a throwing hook ends the session, and for a throw from
onDisconnectitself. On a connected MQTT 5.0 session it runs after the wire has handed its reason-coded DISCONNECT toonSend(or waitedcloseTimeoutMsfor it), so the hook may close the transport.onDisconnectruns after it. A throw from this hook is caught and dropped.