onWebSocketClosed

open suspend fun onWebSocketClosed(cause: Throwable?)(source)

Called after the websocket is closed.

In case of a normal closure, the cause argument is null. The cause is non-null if the closure of the web socket is due to an exception in the STOMP client (STOMP ERROR frame, unexpected websocket close frame, missing heart-beat, decoding errors, etc.).

Note that this callback is not called if the websocket client itself failed with an exception. In that case, onWebSocketClientError is called instead.