summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2014-08-08 16:30:38 +0100
committerSimon MacMullen <simon@rabbitmq.com>2014-08-08 16:30:38 +0100
commita1884877808f6c34c349e132b31db9e45de347d0 (patch)
treed49a729fcf257334a818a502a373b87061f048f0
parenta7df1553ff876998a5171df3ef9e636123c91e51 (diff)
downloadrabbitmq-server-a1884877808f6c34c349e132b31db9e45de347d0.tar.gz
Dialyzer points out that the false branch cannot happen. In bug 26204 we removed that distinction (cancelling an already fired timer); cancel_timer now only returns 'ok'.
-rw-r--r--src/rabbit_amqqueue_process.erl6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl
index 63b18655..89b3e554 100644
--- a/src/rabbit_amqqueue_process.erl
+++ b/src/rabbit_amqqueue_process.erl
@@ -392,10 +392,8 @@ ensure_ttl_timer(Expiry, State = #q{ttl_timer_ref = undefined,
ensure_ttl_timer(Expiry, State = #q{ttl_timer_ref = TRef,
ttl_timer_expiry = TExpiry})
when Expiry + 1000 < TExpiry ->
- case rabbit_misc:cancel_timer(TRef) of
- false -> State;
- _ -> ensure_ttl_timer(Expiry, State#q{ttl_timer_ref = undefined})
- end;
+ rabbit_misc:cancel_timer(TRef),
+ ensure_ttl_timer(Expiry, State#q{ttl_timer_ref = undefined});
ensure_ttl_timer(_Expiry, State) ->
State.