summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2014-01-22 14:33:38 +0000
committerSimon MacMullen <simon@rabbitmq.com>2014-01-22 14:33:38 +0000
commitd50ad0890e5096f0ae466d5868682d0a23f79916 (patch)
treef5138a7ceacaf73d0f7a3aad7258587d834f2e0a /src
parent30c6b56390d72880b634cafba931a5abcb86d065 (diff)
downloadrabbitmq-server-git-d50ad0890e5096f0ae466d5868682d0a23f79916.tar.gz
Don't stomp on timeout when receiving mandatory notification.
Diffstat (limited to 'src')
-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),