disconnectedFlow

val disconnectedFlow: SharedFlow<Throwable?>(source)

Emits when the connection drops unexpectedly.

The value is the Throwable that caused the disconnection (e.g., transport error), or null if the server sent a clean SSH_MSG_DISCONNECT.

This flow does not emit when disconnect is called by the caller.