Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: no auth subscription must only wait for the expected bundle ID. #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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