From 627c58b07d966f56dfa2a1e0270403c804a370ad Mon Sep 17 00:00:00 2001 From: Andrew Mayorov Date: Fri, 1 Dec 2023 19:36:20 +0300 Subject: [PATCH] fix(sessds): handle `expire_awaiting_rel` common timer with no-op Otherwise, the channel crashes when the timer is triggered. --- apps/emqx/src/emqx_persistent_session_ds.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/emqx/src/emqx_persistent_session_ds.erl b/apps/emqx/src/emqx_persistent_session_ds.erl index 376081a70..37385c12c 100644 --- a/apps/emqx/src/emqx_persistent_session_ds.erl +++ b/apps/emqx/src/emqx_persistent_session_ds.erl @@ -438,8 +438,10 @@ handle_timeout(_ClientInfo, ?TIMER_BUMP_LAST_ALIVE_AT, Session0) -> BumpInterval = emqx_config:get([session_persistence, last_alive_update_interval]), EstimatedLastAliveAt = now_ms() + BumpInterval, Session = session_set_last_alive_at_trans(Session0, EstimatedLastAliveAt), - BumpInterval = emqx_config:get([session_persistence, last_alive_update_interval]), - {ok, [], emqx_session:ensure_timer(?TIMER_BUMP_LAST_ALIVE_AT, BumpInterval, Session)}. + {ok, [], emqx_session:ensure_timer(?TIMER_BUMP_LAST_ALIVE_AT, BumpInterval, Session)}; +handle_timeout(_ClientInfo, expire_awaiting_rel, Session) -> + %% TODO: stub + {ok, [], Session}. -spec replay(clientinfo(), [], session()) -> {ok, replies(), session()}.