diff options
author | Alexandru Scvortov <alexandru@rabbitmq.com> | 2010-12-06 11:55:16 +0000 |
---|---|---|
committer | Alexandru Scvortov <alexandru@rabbitmq.com> | 2010-12-06 11:55:16 +0000 |
commit | 53c5b3e08d7a21d6ca81bc6048476ffcf508618d (patch) | |
tree | 5592939959ff40ec10804c711143ccfe1dfb235a | |
parent | c8d85b08d02b6c96419fff88eb5ea77bd0f8f3bc (diff) | |
download | rabbitmq-server-53c5b3e08d7a21d6ca81bc6048476ffcf508618d.tar.gz |
add missing case
-rw-r--r-- | src/rabbit_channel.erl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index e0f6f0e2..aefcd4f0 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -289,8 +289,12 @@ handle_cast(flush_multiple_acks, State) -> handle_cast({confirm, MsgSeqNo, From}, State = #ch{exchange_for_msg = EFM}) -> - {ok, ExchangeName} = dict:find(MsgSeqNo, EFM), - {noreply, send_or_enqueue_ack(MsgSeqNo, From, ExchangeName, State)}. + State1 = case dict:find(MsgSeqNo, EFM) of + {ok, ExchangeName} -> + send_or_enqueue_ack(MsgSeqNo, From, ExchangeName, State); + _ -> State %% no entry in EFM means it's already been confirmed + end, + {noreply, State1}. handle_info({'DOWN', _MRef, process, QPid, _Reason}, State = #ch{queues_for_msg = QFM, exchange_for_msg = EFM}) -> @@ -1366,7 +1370,6 @@ internal_emit_stats(State = #ch{stats_timer = StatsTimer}, Extra) -> {channel_queue_exchange_stats, [{QX, Stats} || {{queue_exchange_stats, QX}, Stats} <- get()]}], - io:format("Stats: ~p~n", [Extra ++ CoarseStats ++ FineStats]), rabbit_event:notify(channel_stats, Extra ++ CoarseStats ++ FineStats) end. |