Skip to content

Commit

Permalink
Don't pause between long polls
Browse files Browse the repository at this point in the history
Pausing different amounts between clients creates a fingerprint.
Set the pause to spec at 0 seconds.
  • Loading branch information
DanGould authored and shinghim committed Dec 13, 2024
1 parent b958b1f commit e220bbd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions payjoin-cli/src/app/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ impl App {
Ok(Some(psbt)) => return Ok(psbt),
Ok(None) => {
println!("No response yet.");
tokio::time::sleep(std::time::Duration::from_secs(5)).await;
}
Err(re) => {
println!("{}", re);
Expand Down Expand Up @@ -245,9 +244,8 @@ impl App {
.process_res(ohttp_response.bytes().await?.to_vec().as_slice(), context)
.map_err(|_| anyhow!("GET fallback failed"))?;
log::debug!("got response");
match proposal {
Some(proposal) => break Ok(proposal),
None => std::thread::sleep(std::time::Duration::from_secs(5)),
if let Some(proposal) = proposal {
break Ok(proposal);
}
}
}
Expand Down

0 comments on commit e220bbd

Please sign in to comment.