693d0382
fix: notify QUIC peers before daemon shutdown
a73x 2026-09-06 05:53
Commit message
src/server/server.zig
| Old | New | ||
|---|---|---|---|
| @@ -913,6 +913,11 @@ pub const Server = struct { | |||
| 913 | // the daemon is going. Every channel, not a per-session sweep: what | 913 | // the daemon is going. Every channel, not a per-session sweep: what |
| 914 | // has to happen here is that no descriptor outlives the table. | 914 | // has to happen here is that no descriptor outlives the table. |
| 915 | for (0..max_agent_chans) |s| self.agents.closeChan(self, s, .silent); | 915 | for (0..max_agent_chans) |s| self.agents.closeChan(self, s, .silent); |
| 916 | // Send CONNECTION_CLOSE while the listener and its QUIC connection | ||
| 917 | // objects are still alive. Closing client sinks first used to tear | ||
| 918 | // down the shared connection state without notifying peers, leaving | ||
| 919 | // remote stop requests waiting for their idle timeout. | ||
| 920 | if (self.quicListener()) |listener| listener.closeAll(); | ||
| 916 | for (0..self.clients.len) |i| self.teardownClient(i, true); | 921 | for (0..self.clients.len) |i| self.teardownClient(i, true); |
| 917 | for (0..self.observers.len) |i| self.dropObserver(i); | 922 | for (0..self.observers.len) |i| self.dropObserver(i); |
| 918 | // After the client slots, never before: a QUIC sink closes its | 923 | // After the client slots, never before: a QUIC sink closes its |