diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2013-06-10 16:11:27 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2013-06-10 16:11:27 +0100 |
commit | 1dae0adaa07263f38c65c543bf665c6dd9b39f54 (patch) | |
tree | 2003562e679c930821fc3b7520954a1368419d1d | |
parent | 3567b5db0906f727a269460ac2ba64128fd2e269 (diff) | |
download | rabbitmq-server-bug25588.tar.gz |
Simplify (and don't bother parsing to integer only to convert back).bug25588
-rw-r--r-- | src/rabbit_amqqueue_process.erl | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index d3e88e8b..3a6759f1 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -922,13 +922,10 @@ make_dead_letter_msg(Msg = #basic_message{content = Content, routing_keys = DeathRoutingKeys, content = Content2}. -per_msg_ttl_header(#'P_basic'{} = Props) -> - case rabbit_basic:parse_expiration(Props) of - {ok, Exp} when is_integer(Exp) -> - [{<<"original-expiration">>, longstr, integer_to_list(Exp)}]; - _ -> - [] - end; +per_msg_ttl_header(#'P_basic'{expiration = undefined}) -> + []; +per_msg_ttl_header(#'P_basic'{expiration = Expiration}) -> + [{<<"original-expiration">>, longstr, Expiration}]; per_msg_ttl_header(_) -> []. |