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.
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 localdisconnect()orreset(). It runs afteronSendhas taken any DISCONNECT the server sends (after an error, after at mostcloseTimeoutMs), so it is the place to close the transport. A session starts whenreceive()first gets bytes;reset()on a wire that never received any doesn't call it.