From c284cea99a60d5bb737677c2338816102a5a2c05 Mon Sep 17 00:00:00 2001 From: Rob Date: Fri, 29 Nov 2024 14:12:49 -0500 Subject: [PATCH] async timeout --- types/src/v0/impls/l1.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/src/v0/impls/l1.rs b/types/src/v0/impls/l1.rs index db9461164..f5f5b8643 100644 --- a/types/src/v0/impls/l1.rs +++ b/types/src/v0/impls/l1.rs @@ -23,6 +23,7 @@ use futures::{ }; use lru::LruCache; use serde::{de::DeserializeOwned, Serialize}; +use std::time::Duration; use tracing::Instrument; use url::Url; @@ -279,7 +280,7 @@ impl L1Client { tracing::info!("established L1 block stream"); loop { // Wait for a block, timing out if we don't get one within 60 seconds - let block_timeout = tokio::time::timeout(Duration::from_secs(60), block_stream.next()).await; + let block_timeout = async_compatibility_layer::art::async_timeout(Duration::from_secs(60), block_stream.next()).await; match block_timeout { // We got a block