cloudflared-mirror/connection
GoncaloGarcia e251a21810 TUN-8621: Prevent QUIC connection from closing before grace period after unregistering
Whenever cloudflared receives a SIGTERM or SIGINT it goes into graceful shutdown mode, which unregisters the connection and closes the control stream. Unregistering makes it so we no longer receive any new requests and makes the edge close the connection, allowing in-flight requests to finish (within a 3 minute period).
 This was working fine for http2 connections, but the quic proxy was cancelling the context as soon as the controls stream ended, forcing the process to stop immediately.

 This commit changes the behavior so that we wait the full grace period before cancelling the request
2024-10-07 10:51:21 -05:00
..
connection.go TUN-8424: Refactor capnp registration server 2024-05-24 11:40:10 -07:00
connection_test.go TUN-7558: Flush on Writes for StreamBasedOriginProxy 2023-07-06 14:22:29 +00:00
control.go TUN-8621: Prevent QUIC connection from closing before grace period after unregistering 2024-10-07 10:51:21 -05:00
errors.go TUN-6740: Detect no UDP packets allowed and fallback from QUIC in that case 2022-09-07 16:32:15 +00:00
event.go TUN-6617: Dont fallback to http2 if QUIC conn was successful. 2022-08-12 08:40:03 +00:00
h2mux.go TUN-7252: Remove h2mux connection 2023-03-07 13:51:37 -08:00
h2mux_header.go TUN-5393: Content-length is no longer a control header for non-h2mux transports 2021-11-17 10:56:15 +00:00
h2mux_header_test.go TUN-5393: Content-length is no longer a control header for non-h2mux transports 2021-11-17 10:56:15 +00:00
header.go TUN-5393: Content-length is no longer a control header for non-h2mux transports 2021-11-17 10:56:15 +00:00
header_test.go TUN-5393: Content-length is no longer a control header for non-h2mux transports 2021-11-17 10:56:15 +00:00
http2.go TUN-8424: Refactor capnp registration server 2024-05-24 11:40:10 -07:00
http2_test.go TUN-8621: Prevent QUIC connection from closing before grace period after unregistering 2024-10-07 10:51:21 -05:00
json.go TUN-3467: Serialize cf-cloudflared-response-meta during package initialization using jsoniter 2020-11-11 15:11:42 +00:00
metrics.go TUN-8422: Add metrics for capnp method calls 2024-05-28 14:14:25 -07:00
observer.go TUN-7131: Add cloudflared log event to connection messages and enable streaming logs 2023-04-12 14:41:11 -07:00
observer_test.go TUN-6583: Remove legacy --ui flag 2022-07-20 16:17:29 -07:00
protocol.go TUN-7167: Respect protocol overrides with --token 2023-02-08 11:03:04 -08:00
protocol_test.go TUN-6938: Force h2mux protocol to http2 for named tunnels 2023-02-06 11:06:02 -08:00
quic.go TUN-8621: Prevent QUIC connection from closing before grace period after unregistering 2024-10-07 10:51:21 -05:00
quic_test.go TUN-8621: Prevent QUIC connection from closing before grace period after unregistering 2024-10-07 10:51:21 -05:00
tunnelsforha.go TUN-3471: Add structured log context to logs 2021-01-05 20:21:16 +00:00