diff --git a/src/emqx.appup.src b/src/emqx.appup.src index 937f31eff..7e21ef4ed 100644 --- a/src/emqx.appup.src +++ b/src/emqx.appup.src @@ -2,10 +2,12 @@ {VSN, [ {"4.3.1", [ + {load_module, emqx_congestion, brutal_purge, soft_purge, []}, {load_module, emqx_node_dump, brutal_purge, soft_purge, []} ]}, {"4.3.0", [ {load_module, emqx_logger_jsonfmt, brutal_purge, soft_purge, []}, + {load_module, emqx_congestion, brutal_purge, soft_purge, []}, {load_module, emqx_connection, brutal_purge, soft_purge, []}, {load_module, emqx_frame, brutal_purge, soft_purge, []}, {load_module, emqx_trie, brutal_purge, soft_purge, []}, @@ -16,11 +18,13 @@ ], [ {"4.3.1", [ + {load_module, emqx_congestion, brutal_purge, soft_purge, []}, {load_module, emqx_node_dump, brutal_purge, soft_purge, []} ]}, {"4.3.0", [ {load_module, emqx_logger_jsonfmt, brutal_purge, soft_purge, []}, {load_module, emqx_connection, brutal_purge, soft_purge, []}, + {load_module, emqx_congestion, brutal_purge, soft_purge, []}, {load_module, emqx_frame, brutal_purge, soft_purge, []}, {load_module, emqx_trie, brutal_purge, soft_purge, []}, %% Just load the module. We don't need to change the 'messages.retained' diff --git a/src/emqx_congestion.erl b/src/emqx_congestion.erl index ea99a63b1..4ec20034d 100644 --- a/src/emqx_congestion.erl +++ b/src/emqx_congestion.erl @@ -48,7 +48,10 @@ maybe_alarm_conn_congestion(Socket, Transport, Channel) -> cancel_alarms(Socket, Transport, Channel) -> lists:foreach(fun(Reason) -> - do_cancel_alarm_congestion(Socket, Transport, Channel, Reason) + case has_alarm_sent(Reason) of + true -> do_cancel_alarm_congestion(Socket, Transport, Channel, Reason); + false -> ok + end end, ?ALL_ALARM_REASONS). is_alarm_enabled(Channel) ->