Skip to content

Commit

Permalink
Don't shutdown io-uring loop on session shutdown (#1049)
Browse files Browse the repository at this point in the history
* Note difference of loop kind in shutdown message

* Add advisory ignore

* Remove uring shutdown from session shutdown
  • Loading branch information
Jake-Shadle authored Dec 10, 2024
1 parent 8e0f703 commit e2019ba
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ targets = [
all-features = true

[advisories]
ignore = ["RUSTSEC-2024-0384"]
ignore = ["RUSTSEC-2024-0384", { id = "RUSTSEC-2024-0421", reason = "transitive dependency, updated but not released https://github.com/hickory-dns/hickory-dns/pull/2564" }]

[bans]
deny = [
Expand Down
8 changes: 7 additions & 1 deletion src/components/proxy/io_uring_shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,13 @@ impl IoUringLoop {
loop_ctx.enqueue_send(pending);
}
} else {
tracing::info!("io-uring loop shutdown requested");
if matches!(ctx, PacketProcessorCtx::Router { .. }) {
tracing::info!(
"downstream io-uring loop shutdown requested"
);
} else {
tracing::info!("session io-uring loop shutdown requested");
}
break 'io;
}
}
Expand Down
1 change: 0 additions & 1 deletion src/components/proxy/sessions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,6 @@ impl Session {
self.active_session_metric().dec();
inner_metrics::duration_secs().observe(self.created_at.elapsed().as_secs() as f64);
tracing::debug!(source = %self.key.source, dest_address = %self.key.dest, "Session closed");
self.pending_sends.shutdown_receiver();
SessionPool::release_socket(self.pool.clone(), self.key, self.socket_port);
}
}
Expand Down

0 comments on commit e2019ba

Please sign in to comment.