Skip to content
Closed
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
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@ unused-async = "warn"


[patch.crates-io]
iroh-quinn = { git = "https://github.com/n0-computer/quinn", branch = "main-iroh" }
iroh-quinn-proto = { git = "https://github.com/n0-computer/quinn", branch = "main-iroh" }
iroh-quinn-udp = { git = "https://github.com/n0-computer/quinn", branch = "main-iroh" }

iroh-quinn = { git = "https://github.com/n0-computer/quinn", branch = "arqu/fix_close_delay" }
iroh-quinn-proto = { git = "https://github.com/n0-computer/quinn", branch = "arqu/fix_close_delay" }
iroh-quinn-udp = { git = "https://github.com/n0-computer/quinn", branch = "arqu/fix_close_delay" }
netwatch = { git = "https://github.com/n0-computer/net-tools", branch = "main" }

# iroh-quinn = { path = "../quinn/quinn" }
Expand All @@ -56,4 +55,4 @@ netwatch = { git = "https://github.com/n0-computer/net-tools", branch = "main" }
# [patch."https://github.com/n0-computer/quinn"]
# iroh-quinn = { path = "../quinn/quinn" }
# iroh-quinn-proto = { path = "../quinn/quinn-proto" }
# iroh-quinn-udp = { path = "../quinn/quinn-udp" }
# iroh-quinn-udp = { path = "../quinn/quinn-udp" }
4 changes: 2 additions & 2 deletions iroh-relay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ postcard = { version = "1", default-features = false, features = [
"use-std",
"experimental-derive",
] }
quinn = { package = "iroh-quinn", git = "https://github.com/n0-computer/quinn", branch = "main-iroh", default-features = false, features = ["rustls-ring"] }
quinn-proto = { package = "iroh-quinn-proto", git = "https://github.com/n0-computer/quinn", branch = "main-iroh" }
quinn = { package = "iroh-quinn", git = "https://github.com/n0-computer/quinn", branch = "arqu/fix_close_delay", default-features = false, features = ["rustls-ring"] }
quinn-proto = { package = "iroh-quinn-proto", git = "https://github.com/n0-computer/quinn", branch = "arqu/fix_close_delay" }
rand = "0.9.2"
reqwest = { version = "0.12", default-features = false, features = [
"rustls-tls",
Expand Down
8 changes: 4 additions & 4 deletions iroh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ n0-watcher = "0.6"
netwatch = { version = "0.12" }
pin-project = "1"
pkarr = { version = "5", default-features = false, features = ["relays"] }
quinn = { package = "iroh-quinn", git = "https://github.com/n0-computer/quinn", branch = "main-iroh", default-features = false, features = ["rustls-ring"] }
quinn-proto = { package = "iroh-quinn-proto", git = "https://github.com/n0-computer/quinn", branch = "main-iroh" }
quinn-udp = { package = "iroh-quinn-udp", git = "https://github.com/n0-computer/quinn", branch = "main-iroh" }
quinn = { package = "iroh-quinn", git = "https://github.com/n0-computer/quinn", branch = "arqu/fix_close_delay", default-features = false, features = ["rustls-ring"] }
quinn-proto = { package = "iroh-quinn-proto", git = "https://github.com/n0-computer/quinn", branch = "arqu/fix_close_delay" }
quinn-udp = { package = "iroh-quinn-udp", git = "https://github.com/n0-computer/quinn", branch = "arqu/fix_close_delay" }
rand = "0.9.2"
reqwest = { version = "0.12", default-features = false, features = [
"rustls-tls",
Expand Down Expand Up @@ -82,7 +82,7 @@ hickory-resolver = "0.25.1"
igd-next = { version = "0.16", features = ["aio_tokio"] }
netdev = { version = "0.39.0" }
portmapper = { version = "0.12", default-features = false }
quinn = { package = "iroh-quinn", git = "https://github.com/n0-computer/quinn", branch = "main-iroh", default-features = false, features = ["runtime-tokio", "rustls-ring"] }
quinn = { package = "iroh-quinn", git = "https://github.com/n0-computer/quinn", branch = "arqu/fix_close_delay", default-features = false, features = ["runtime-tokio", "rustls-ring"] }
tokio = { version = "1", features = [
"io-util",
"macros",
Expand Down
2 changes: 1 addition & 1 deletion iroh/bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ iroh = { path = "..", default-features = false }
iroh-metrics = { version = "0.37", optional = true }
n0-future = "0.3.0"
n0-error = "0.1.0"
quinn = { package = "iroh-quinn", git = "https://github.com/n0-computer/quinn", branch = "main-iroh" }
quinn = { package = "iroh-quinn", git = "https://github.com/n0-computer/quinn", branch = "arqu/fix_close_delay" }
rand = "0.9.2"
rcgen = "0.14"
rustls = { version = "0.23.33", default-features = false, features = ["ring"] }
Expand Down
6 changes: 5 additions & 1 deletion iroh/src/magicsock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,11 @@ impl Handle {
#[instrument(skip_all)]
pub(crate) async fn close(&self) {
trace!(me = ?self.public_key, "magicsock closing...");

// Set closing flag BEFORE wait_idle() to prevent new net_report runs
// from creating QAD connections while we're draining existing ones.
self.msock.closing.store(true, Ordering::Relaxed);

// Initiate closing all connections, and refuse future connections.
self.endpoint.close(0u16.into(), b"");

Expand All @@ -1002,7 +1007,6 @@ impl Handle {
if self.msock.is_closed() {
return;
}
self.msock.closing.store(true, Ordering::Relaxed);
self.shutdown_token.cancel();

// MutexGuard is not held across await points
Expand Down
Loading