zebra_network::peer::handshake

Function heartbeat_timeout

source
async fn heartbeat_timeout<F, T>(
    fut: F,
    address_book_updater: &Sender<MetaAddrChange>,
    connected_addr: &ConnectedAddr,
) -> Result<T, BoxError>
where F: Future<Output = Result<T, BoxError>>,
Expand description

Wrap fut in a timeout, handing any inner or outer errors using handle_heartbeat_error.