Skip to content

Commit 6bf3ee1

Browse files
committed
Don't pause between long polls
Pausing different amounts between clients creates a fingerprint. Set the pause to spec at 0 seconds.
1 parent 52d19ae commit 6bf3ee1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

payjoin-cli/src/app/v2.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ impl App {
206206
Ok(Some(psbt)) => return Ok(psbt),
207207
Ok(None) => {
208208
println!("No response yet.");
209-
tokio::time::sleep(std::time::Duration::from_secs(5)).await;
210209
}
211210
Err(re) => {
212211
println!("{}", re);
@@ -245,9 +244,8 @@ impl App {
245244
.process_res(ohttp_response.bytes().await?.to_vec().as_slice(), context)
246245
.map_err(|_| anyhow!("GET fallback failed"))?;
247246
log::debug!("got response");
248-
match proposal {
249-
Some(proposal) => break Ok(proposal),
250-
None => std::thread::sleep(std::time::Duration::from_secs(5)),
247+
if let Some(proposal) = proposal {
248+
break Ok(proposal);
251249
}
252250
}
253251
}

0 commit comments

Comments
 (0)