feat(quic): mqtt 5.0 graceful shutdown in takeover

This commit is contained in:
William Yang 2024-02-26 23:05:49 +01:00
parent c8f9ffdc1f
commit 6c7b7741d5
1 changed files with 2 additions and 1 deletions

View File

@ -149,7 +149,8 @@ fast_close({quic, _Conn, Stream, _Info}) ->
ok.
shutdown({quic, _Conn, Stream, _Info}, read_write) ->
quicer:async_shutdown_stream(Stream).
%% A graceful shutdown means both side shutdown the read and write gracefully.
quicer:shutdown_stream(Stream, ?QUIC_STREAM_SHUTDOWN_FLAG_GRACEFUL, 1, 5000).
-spec ensure_ok_or_exit(atom(), list(term())) -> term().
ensure_ok_or_exit(Fun, Args = [Sock | _]) when is_atom(Fun), is_list(Args) ->