Skip to main content

run

Function run 

Source
async fn run(cfg: GotifyConfig, tx: Sender<GotifyEvent>, shutdown: Receiver<()>)
Expand description

Long-lived reconnect loop: connect (emit GotifyEvent::Connected), forward each message as GotifyEvent::Message, and on drop/error emit GotifyEvent::Disconnected then retry with exponential backoff. The backoff resets to the floor only after a healthy session (one that stayed up past MIN_HEALTHY_UPTIME); a fast drop or failed dial keeps it escalating. Exits when shutdown fires or the sender is dropped.