diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2013-04-12 15:44:55 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2013-04-12 15:44:55 +0100 |
commit | 97dc8b329186bc528034c7846a8c1244e138f802 (patch) | |
tree | 4e9251c7a14812fb8ee32eddb3eb03f338d2b3aa | |
parent | 569cc88471263357776c316f7d6dfeff370bf687 (diff) | |
download | rabbitmq-server-bug25107.tar.gz |
Maybe clearer?bug25107
-rw-r--r-- | src/rabbit_amqqueue_process.erl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index e6bc71fe..fb2c16c8 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -934,9 +934,13 @@ is_dead_letter_cycle(Queue, Deaths) -> %% Is there a cycle, and if so, is it entirely due to expiry? case Rest of [] -> false; - [H|_] -> [] =:= [D || {table, D} <- Cycle ++ [H], - {longstr, <<"expired">>} =/= - rabbit_misc:table_lookup(D, <<"reason">>)] + [H|_] -> lists:all( + fun ({table, D}) -> + {longstr, <<"expired">>} =:= + rabbit_misc:table_lookup(D, <<"reason">>); + (_) -> + false + end, Cycle ++ [H]) end. make_dead_letter_msg(Msg = #basic_message{content = Content, |