Skip to content

Commit 0968f6c

Browse files
experiment: try out large shutdown timer on transfer
1 parent fbdf2c7 commit 0968f6c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

iroh/examples/transfer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ async fn fetch(endpoint: Endpoint, remote_addr: EndpointAddr) -> Result<()> {
422422

423423
// We received the last message: close all connections and allow for the close
424424
// message to be sent.
425-
tokio::time::timeout(Duration::from_secs(3), endpoint.close())
425+
tokio::time::timeout(Duration::from_secs(30), endpoint.close())
426426
.await
427427
.anyerr()?;
428428

iroh/src/magicsock.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,9 @@ impl Handle {
997997
// connection close codes, and close the endpoint properly.
998998
// If this call is skipped, then connections that protocols close just shortly before the
999999
// call to `Endpoint::close` will in most cases cause connection time-outs on remote ends.
1000+
debug!("wait_idle start");
10001001
self.endpoint.wait_idle().await;
1002+
debug!("wait_idle done");
10011003

10021004
if self.msock.is_closed() {
10031005
return;

0 commit comments

Comments
 (0)