Skip to main content

await_connection

Function await_connection 

Source
async fn await_connection<T>(
    signals: &ConnectionSignals,
    tx: &Sender<T>,
) -> ControlFlow<()>
Expand description

Waits until the connection is usable again.

Returns immediately while connected. Otherwise it parks until the NATS event callback signals a reconnect, or until the receiver is dropped — the latter yields ControlFlow::Break, telling the caller to stop.