fix(sessds): handle `expire_awaiting_rel` common timer with no-op

Otherwise, the channel crashes when the timer is triggered.
This commit is contained in:
Andrew Mayorov 2023-12-01 19:36:20 +03:00
parent 47bc747323
commit 627c58b07d
No known key found for this signature in database
GPG Key ID: 2837C62ACFBFED5D
1 changed files with 4 additions and 2 deletions

View File

@ -438,8 +438,10 @@ handle_timeout(_ClientInfo, ?TIMER_BUMP_LAST_ALIVE_AT, Session0) ->
BumpInterval = emqx_config:get([session_persistence, last_alive_update_interval]), BumpInterval = emqx_config:get([session_persistence, last_alive_update_interval]),
EstimatedLastAliveAt = now_ms() + BumpInterval, EstimatedLastAliveAt = now_ms() + BumpInterval,
Session = session_set_last_alive_at_trans(Session0, EstimatedLastAliveAt), 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()) -> -spec replay(clientinfo(), [], session()) ->
{ok, replies(), session()}. {ok, replies(), session()}.