diff --git a/apps/emqx/rebar.config b/apps/emqx/rebar.config index 71f581267..5400cda2f 100644 --- a/apps/emqx/rebar.config +++ b/apps/emqx/rebar.config @@ -45,7 +45,7 @@ {meck, "0.9.2"}, {proper, "1.4.0"}, {bbmustache, "1.10.0"}, - {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.9.1"}}} + {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.9.7"}}} ]}, {extra_src_dirs, [{"test", [recursive]}, {"integration_test", [recursive]}]} @@ -55,7 +55,7 @@ {meck, "0.9.2"}, {proper, "1.4.0"}, {bbmustache, "1.10.0"}, - {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.9.1"}}} + {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.9.7"}}} ]}, {extra_src_dirs, [{"test", [recursive]}]} ]} diff --git a/apps/emqx/rebar.config.script b/apps/emqx/rebar.config.script index 174663e80..d68998c4c 100644 --- a/apps/emqx/rebar.config.script +++ b/apps/emqx/rebar.config.script @@ -24,7 +24,7 @@ IsQuicSupp = fun() -> end, Bcrypt = {bcrypt, {git, "https://github.com/emqx/erlang-bcrypt.git", {tag, "0.6.0"}}}, -Quicer = {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.0.202"}}}. +Quicer = {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.0.303"}}}. Dialyzer = fun(Config) -> {dialyzer, OldDialyzerConfig} = lists:keyfind(dialyzer, 1, Config), diff --git a/apps/emqx/src/emqx_quic_stream.erl b/apps/emqx/src/emqx_quic_stream.erl index 05413b0cf..63af45b1b 100644 --- a/apps/emqx/src/emqx_quic_stream.erl +++ b/apps/emqx/src/emqx_quic_stream.erl @@ -184,7 +184,7 @@ peer_send_aborted(Stream, ErrorCode, S) -> -spec peer_send_shutdown(stream_handle(), undefined, cb_data()) -> cb_ret(). peer_send_shutdown(Stream, undefined, S) -> - ok = quicer:async_shutdown_stream(Stream, ?QUIC_STREAM_SHUTDOWN_FLAG_GRACEFUL, 0), + _ = quicer:async_shutdown_stream(Stream, ?QUIC_STREAM_SHUTDOWN_FLAG_GRACEFUL, 0), {ok, S}. -spec send_complete(stream_handle(), boolean(), cb_data()) -> cb_ret(). diff --git a/apps/emqx/test/emqx_quic_multistreams_SUITE.erl b/apps/emqx/test/emqx_quic_multistreams_SUITE.erl index c5eaf4c24..b2205a659 100644 --- a/apps/emqx/test/emqx_quic_multistreams_SUITE.erl +++ b/apps/emqx/test/emqx_quic_multistreams_SUITE.erl @@ -669,22 +669,21 @@ t_multi_streams_packet_malform(Config) -> case quicer:send(MalformStream, <<0, 0, 0, 0, 0, 0, 0, 0, 0, 0>>) of {ok, 10} -> ok; {error, cancelled} -> ok; - {error, stm_send_error, aborted} -> ok + {error, stm_send_error, aborted} -> ok; + {error, closed} -> ok end, ?assert(is_list(emqtt:info(C))), - - {error, stm_send_error, _} = + {error, closed} = snabbkaffe:retry( 10000, 10, fun() -> - {error, stm_send_error, _} = quicer:send( + {error, closed} = quicer:send( MalformStream, <<1, 2, 3, 4, 5, 6, 7, 8, 9, 0>> ) end ), - ?assert(is_list(emqtt:info(C))), ok = emqtt:disconnect(C). @@ -770,9 +769,9 @@ t_multi_streams_packet_too_large(Config) -> timeout = recv_pub(1), ?assert(is_list(emqtt:info(C))), - %% Connection could be kept - {error, stm_send_error, _} = quicer:send(via_stream(PubVia), <<1>>), - {error, stm_send_error, _} = quicer:send(via_stream(PubVia2), <<1>>), + %% Connection could be kept but data stream are closed! + {error, closed} = quicer:send(via_stream(PubVia), <<1>>), + {error, closed} = quicer:send(via_stream(PubVia2), <<1>>), %% We could send data over new stream {ok, PubVia3} = emqtt:start_data_stream(C, []), ok = emqtt:publish_async( diff --git a/changes/ce/feat-12040.en.md b/changes/ce/feat-12040.en.md new file mode 100644 index 000000000..de092139a --- /dev/null +++ b/changes/ce/feat-12040.en.md @@ -0,0 +1,2 @@ +Upgrade QUIC stack, more features on the way! + diff --git a/mix.exs b/mix.exs index 2ca4bc3e2..123273266 100644 --- a/mix.exs +++ b/mix.exs @@ -64,7 +64,7 @@ defmodule EMQXUmbrella.MixProject do {:pbkdf2, github: "emqx/erlang-pbkdf2", tag: "2.0.4", override: true}, # maybe forbid to fetch quicer {:emqtt, - github: "emqx/emqtt", tag: "1.9.1", override: true, system_env: maybe_no_quic_env()}, + github: "emqx/emqtt", tag: "1.9.7", override: true, system_env: maybe_no_quic_env()}, {:rulesql, github: "emqx/rulesql", tag: "0.1.7"}, {:observer_cli, "1.7.1"}, {:system_monitor, github: "ieQu1/system_monitor", tag: "3.0.3"}, @@ -830,7 +830,7 @@ defmodule EMQXUmbrella.MixProject do defp quicer_dep() do if enable_quicer?(), # in conflict with emqx and emqtt - do: [{:quicer, github: "emqx/quic", tag: "0.0.202", override: true}], + do: [{:quicer, github: "emqx/quic", tag: "0.0.303", override: true}], else: [] end diff --git a/rebar.config b/rebar.config index 3a887e941..efdba5eaa 100644 --- a/rebar.config +++ b/rebar.config @@ -69,7 +69,7 @@ , {ecpool, {git, "https://github.com/emqx/ecpool", {tag, "0.5.4"}}} , {replayq, {git, "https://github.com/emqx/replayq.git", {tag, "0.3.7"}}} , {pbkdf2, {git, "https://github.com/emqx/erlang-pbkdf2.git", {tag, "2.0.4"}}} - , {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.9.1"}}} + , {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.9.7"}}} , {rulesql, {git, "https://github.com/emqx/rulesql", {tag, "0.1.7"}}} , {observer_cli, "1.7.1"} % NOTE: depends on recon 2.5.x , {system_monitor, {git, "https://github.com/ieQu1/system_monitor", {tag, "3.0.3"}}} diff --git a/rebar.config.erl b/rebar.config.erl index 98e29f32a..c3ace671c 100644 --- a/rebar.config.erl +++ b/rebar.config.erl @@ -39,7 +39,7 @@ bcrypt() -> {bcrypt, {git, "https://github.com/emqx/erlang-bcrypt.git", {tag, "0.6.1"}}}. quicer() -> - {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.0.202"}}}. + {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.0.303"}}}. jq() -> {jq, {git, "https://github.com/emqx/jq", {tag, "v0.3.11"}}}.