Skip to main content

network_retry_loop

Function network_retry_loop 

Source
pub async fn network_retry_loop<'a, A, AF, E>(
    config: NetworkLoopConfig<'a, A, E>,
) -> Result<(), TelegramError>
where A: Fn() -> AF, AF: Future<Output = Result<(), TelegramError>>, E: Fn(&TelegramError),
Expand description

Run action_cb in a loop, retrying on TelegramError according to the back-off / retry policy described by config.

ยงErrors

Returns the last TelegramError if retries are exhausted, or propagates an InvalidToken error immediately.