Skip to content

Commit 5cfbb9f

Browse files
committed
WIP: pre/post_hibernate
1 parent 5a86545 commit 5cfbb9f

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

deps/rabbit/src/rabbit_channel.erl

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -745,20 +745,20 @@ handle_info({update_user_state, User}, State = #ch{cfg = Cfg}) ->
745745
noreply(State#ch{cfg = Cfg#conf{user = User}}).
746746

747747

748-
handle_pre_hibernate(State0) ->
749-
ok = clear_permission_cache(),
750-
State = maybe_cancel_tick_timer(State0),
751-
rabbit_event:if_enabled(
752-
State, #ch.stats_timer,
753-
fun () -> emit_stats(State,
754-
[{idle_since,
755-
os:system_time(millisecond)}])
756-
end),
757-
{hibernate, rabbit_event:stop_stats_timer(State, #ch.stats_timer)}.
758-
759-
handle_post_hibernate(State0) ->
760-
State = init_tick_timer(State0),
761-
{noreply, State}.
748+
%handle_pre_hibernate(State0) ->
749+
% ok = clear_permission_cache(),
750+
% State = maybe_cancel_tick_timer(State0),
751+
% rabbit_event:if_enabled(
752+
% State, #ch.stats_timer,
753+
% fun () -> emit_stats(State,
754+
% [{idle_since,
755+
% os:system_time(millisecond)}])
756+
% end),
757+
% {hibernate, rabbit_event:stop_stats_timer(State, #ch.stats_timer)}.
758+
%
759+
%handle_post_hibernate(State0) ->
760+
% State = init_tick_timer(State0),
761+
% {noreply, State}.
762762

763763
terminate(_Reason,
764764
State = #ch{cfg = #conf{user = #user{username = Username}},

0 commit comments

Comments
 (0)