From 2201dec2f49223534b674cc465de0b9fa03c800d Mon Sep 17 00:00:00 2001 From: William Yang Date: Mon, 8 Jan 2024 23:36:23 +0100 Subject: [PATCH] feat(quic): 3s cutoff time for fast_close --- apps/emqx/src/emqx_quic_stream.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/emqx/src/emqx_quic_stream.erl b/apps/emqx/src/emqx_quic_stream.erl index 63af45b1b..42f153b28 100644 --- a/apps/emqx/src/emqx_quic_stream.erl +++ b/apps/emqx/src/emqx_quic_stream.erl @@ -139,8 +139,8 @@ fast_close({ConnOwner, Conn, _ConnInfo}) when is_pid(ConnOwner) -> _ = quicer:async_shutdown_connection(Conn, ?QUIC_CONNECTION_SHUTDOWN_FLAG_NONE, 0), ok; fast_close({quic, _Conn, Stream, _Info}) -> - %% Force flush - _ = quicer:async_shutdown_stream(Stream), + %% Force flush, cutoff time 3s + _ = quicer:shutdown_stream(Stream, 3000), %% @FIXME Since we shutdown the control stream, we shutdown the connection as well %% *BUT* Msquic does not flush the send buffer if we shutdown the connection after %% gracefully shutdown the stream.