Skip to content
Draft
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion iroh/examples/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ async fn fetch(endpoint: Endpoint, remote_addr: EndpointAddr) -> Result<()> {

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

Expand Down
2 changes: 2 additions & 0 deletions iroh/src/magicsock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,9 @@ impl Handle {
// connection close codes, and close the endpoint properly.
// If this call is skipped, then connections that protocols close just shortly before the
// call to `Endpoint::close` will in most cases cause connection time-outs on remote ends.
debug!("wait_idle start");
self.endpoint.wait_idle().await;
debug!("wait_idle done");

if self.msock.is_closed() {
return;
Expand Down
Loading