diff options
author | Tim Watson <tim@rabbitmq.com> | 2012-10-31 16:45:43 +0000 |
---|---|---|
committer | Tim Watson <tim@rabbitmq.com> | 2012-10-31 16:45:43 +0000 |
commit | 74e70c287d0e5cef5c8e12d3c39b57e5f446ff4f (patch) | |
tree | cc5ddb2372bc464d94a6a28ab58a1f74d881dddb | |
parent | a8741954d4090e5b8c989466bd332cf8868657d5 (diff) | |
download | rabbitmq-server-74e70c287d0e5cef5c8e12d3c39b57e5f446ff4f.tar.gz |
revert 6982ce6874b3 => this broke ttl handling for rejects and ttl=0/immediate equivalence
-rw-r--r-- | src/rabbit_amqqueue_process.erl | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index b52d2213..2cf3e9f1 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -719,9 +719,6 @@ calculate_msg_expiry(#basic_message{content = Content}, TTL) -> T -> now_micros() + T * 1000 end. -drop_expired_messages(State = #q{ttl = undefined, - ttl_timer_ref = undefined}) -> - State; drop_expired_messages(State = #q{backing_queue_state = BQS, backing_queue = BQ }) -> Now = now_micros(), @@ -740,8 +737,7 @@ drop_expired_messages(State = #q{backing_queue_state = BQS, ensure_ttl_timer(case Props of undefined -> undefined; #message_properties{expiry = Exp} -> Exp - end, State#q{backing_queue_state = BQS1, - ttl_timer_ref = undefined}). + end, State#q{backing_queue_state = BQS1}). ensure_ttl_timer(undefined, State) -> State; @@ -1325,7 +1321,7 @@ handle_info(maybe_expire, State) -> end; handle_info(drop_expired, State) -> - noreply(drop_expired_messages(State)); + noreply(drop_expired_messages(State#q{ttl_timer_ref = undefined})); handle_info(emit_stats, State) -> %% Do not invoke noreply as it would see no timer and create a new one. |