Skip to content

Commit

Permalink
async timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-maron committed Nov 29, 2024
1 parent 0ba454a commit c284cea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion types/src/v0/impls/l1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ use futures::{
};
use lru::LruCache;
use serde::{de::DeserializeOwned, Serialize};
use std::time::Duration;
use tracing::Instrument;
use url::Url;

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c284cea

Please sign in to comment.