Skip to content

Commit

Permalink
fix: no auth subscription must only wait for the expected bundle ID.
Browse files Browse the repository at this point in the history
  • Loading branch information
serejke committed Nov 18, 2024
1 parent 51fb639 commit 0e3e862
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions searcher_client/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use std::{
sync::Arc,
time::{Duration, Instant},
};
use std::{future, sync::Arc, time::{Duration, Instant}};

use futures_util::StreamExt;
use jito_protos::{
Expand Down Expand Up @@ -120,7 +117,9 @@ where
let mut time_left = 5000;
while let Ok(Some(Ok(results))) = timeout(
Duration::from_millis(time_left),
bundle_results_subscription.next(),
bundle_results_subscription
.filter(|bundle_result| future::ready(matches!(bundle_result, Ok(bundle) if bundle.bundle_id == uuid)))
.next(),
)
.await
{
Expand Down

0 comments on commit 0e3e862

Please sign in to comment.