Longer timeout (120 secs) for swap_setup protocol

Given that we combined the `spot_price` and the `execution_setup` messaging into one protocol we should allow the protocol to take longer than 60 seconds to complete.
This is especially important for connections over Tor, where messaging can take significantly longer than over clearnet.
I ran some tests with Tor and did not run into issues with the 60 seconds, but we get very close to the timeout, so we better make it more resilient by adding more time.
This commit is contained in:
Daniel Karzel 2021-06-28 11:30:24 +10:00
parent fd18a07426
commit cd14e22cdf
No known key found for this signature in database
GPG Key ID: 30C3FC2E438ADB6E
2 changed files with 2 additions and 2 deletions

View File

@ -227,7 +227,7 @@ impl<LR> Handler<LR> {
env_config,
latest_rate,
resume_only,
timeout: Duration::from_secs(60),
timeout: Duration::from_secs(120),
keep_alive: KeepAlive::Until(Instant::now() + Duration::from_secs(5)),
}
}

View File

@ -109,7 +109,7 @@ impl Handler {
Self {
env_config,
outbound_stream: OptionFuture::from(None),
timeout: Duration::from_secs(60),
timeout: Duration::from_secs(120),
new_swaps: VecDeque::default(),
bitcoin_wallet,
keep_alive: KeepAlive::Until(Instant::now() + Duration::from_secs(5)),