@qualithm/mqtt-wire - v0.8.0
    Preparing search index...

    Type Alias OnDisconnectHook

    OnDisconnectHook: (
        packet?: DisconnectPacket,
        reason?: Error,
    ) => void | Promise<void>

    Hook called once when a session ends, however it ends: a client DISCONNECT (packet), a refused CONNECT, a protocol error or keepalive timeout, a hook that threw (reason), or a local disconnect() or reset(). It runs after onSend has taken any DISCONNECT the server sends (after an error, after at most closeTimeoutMs), so it is the place to close the transport. A session starts when receive() first gets bytes; reset() on a wire that never received any doesn't call it.

    Type Declaration