diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2012-08-13 15:13:48 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2012-08-13 15:13:48 +0100 |
| commit | 58c2fd25b3b65f88410fb6e7d866953b8a8e02a8 (patch) | |
| tree | a8c76b861df87e29380b11a1ddbde07e9e401c78 /src | |
| parent | d1200a6f962bae90fe437e6e3624559f86d96dc2 (diff) | |
| download | rabbitmq-server-git-58c2fd25b3b65f88410fb6e7d866953b8a8e02a8.tar.gz | |
don't re-schedule timer when the new timer would go off <1ms sooner
...since timer granularity is 1ms
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_amqqueue_process.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index 283eba7c7a..66c9007910 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -748,7 +748,7 @@ ensure_ttl_timer(Expiry, State = #q{ttl_timer_ref = undefined}) -> State#q{ttl_timer_ref = TRef, ttl_timer_expiry = Expiry}; ensure_ttl_timer(Expiry, State = #q{ttl_timer_ref = TRef, ttl_timer_expiry = TExpiry}) - when Expiry < TExpiry -> + when Expiry + 1000 < TExpiry -> case erlang:cancel_timer(TRef) of false -> State; _ -> ensure_ttl_timer(Expiry, State#q{ttl_timer_ref = undefined}) |
