summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2013-06-10 16:11:27 +0100
committerSimon MacMullen <simon@rabbitmq.com>2013-06-10 16:11:27 +0100
commit1dae0adaa07263f38c65c543bf665c6dd9b39f54 (patch)
tree2003562e679c930821fc3b7520954a1368419d1d
parent3567b5db0906f727a269460ac2ba64128fd2e269 (diff)
downloadrabbitmq-server-bug25588.tar.gz
Simplify (and don't bother parsing to integer only to convert back).bug25588
-rw-r--r--src/rabbit_amqqueue_process.erl11
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(_) ->
[].