Преглед изворни кода

fix(sessds): cleanup renew streams timer

Ilya Averyanov пре 1 година
родитељ
комит
d7f08a761a
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      apps/emqx/src/emqx_persistent_session_ds.erl

+ 3 - 2
apps/emqx/src/emqx_persistent_session_ds.erl

@@ -693,9 +693,10 @@ handle_timeout(ClientInfo, expire_awaiting_rel, Session) ->
 handle_timeout(
 handle_timeout(
     _ClientInfo,
     _ClientInfo,
     ?TIMER_RENEW_STREAMS,
     ?TIMER_RENEW_STREAMS,
-    Session
+    Session0
 ) ->
 ) ->
-    {ok, [], renew_streams(all, Session)};
+    Session = renew_streams(all, Session0),
+    {ok, [], Session#{?TIMER_RENEW_STREAMS := undefined}};
 handle_timeout(_ClientInfo, Timeout, Session) ->
 handle_timeout(_ClientInfo, Timeout, Session) ->
     ?SLOG(warning, #{msg => "unknown_ds_timeout", timeout => Timeout}),
     ?SLOG(warning, #{msg => "unknown_ds_timeout", timeout => Timeout}),
     {ok, [], Session}.
     {ok, [], Session}.