summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rabbit_channel.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index e24b8d4a70..3ecb25f015 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -349,9 +349,10 @@ handle_cast(force_event_refresh, State) ->
noreply(State);
%% TODO duplication?
-handle_cast({mandatory_received, MsgSeqNo}, State) ->
+handle_cast({mandatory_received, MsgSeqNo}, State = #ch{confirmed = C}) ->
%% NB: don't call noreply/1 since we don't want to send confirms.
- {noreply, ensure_stats_timer(handle_mandatory(MsgSeqNo, State)), hibernate};
+ Timeout = case C of [] -> hibernate; _ -> 0 end,
+ {noreply, ensure_stats_timer(handle_mandatory(MsgSeqNo, State)), Timeout};
handle_cast({confirm, MsgSeqNos, From}, State) ->
State1 = #ch{confirmed = C} = confirm(MsgSeqNos, From, State),