diff options
author | Matthew Sackman <matthew@rabbitmq.com> | 2011-05-20 14:32:16 +0100 |
---|---|---|
committer | Matthew Sackman <matthew@rabbitmq.com> | 2011-05-20 14:32:16 +0100 |
commit | a749a8f513b881ff35f1de0e225b58aa6575460f (patch) | |
tree | bfe039bec55637df8014a72c80cc0f62757cf4ce /src/rabbit_mirror_queue_slave.erl | |
parent | 2e2d327c233a4116d13eee26792fba2f365e0e8e (diff) | |
download | rabbitmq-server-a749a8f513b881ff35f1de0e225b58aa6575460f.tar.gz |
BQ:idle_timeout => BQ:timeout
Diffstat (limited to 'src/rabbit_mirror_queue_slave.erl')
-rw-r--r-- | src/rabbit_mirror_queue_slave.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rabbit_mirror_queue_slave.erl b/src/rabbit_mirror_queue_slave.erl index fc50c932..46020271 100644 --- a/src/rabbit_mirror_queue_slave.erl +++ b/src/rabbit_mirror_queue_slave.erl @@ -205,7 +205,7 @@ handle_cast(update_ram_duration, backing_queue_state = BQS2 }); handle_cast(sync_timeout, State) -> - noreply(backing_queue_idle_timeout( + noreply(backing_queue_timeout( State #state { sync_timer_ref = undefined })); handle_cast({rollback, _Txn, _ChPid}, State) -> @@ -213,7 +213,7 @@ handle_cast({rollback, _Txn, _ChPid}, State) -> noreply(State). handle_info(timeout, State) -> - noreply(backing_queue_idle_timeout(State)); + noreply(backing_queue_timeout(State)); handle_info({'DOWN', _MonitorRef, process, Pid, _Reason}, State = #state { gm = GM }) -> @@ -499,13 +499,13 @@ next_state(State = #state{backing_queue = BQ, backing_queue_state = BQS}) -> State1 = ensure_rate_timer( confirm_messages(MsgIds, State #state { backing_queue_state = BQS1 })), - case BQ:needs_idle_timeout(BQS1) of + case BQ:needs_timeout(BQS1) of true -> {ensure_sync_timer(State1), 0}; false -> {stop_sync_timer(State1), hibernate} end. -backing_queue_idle_timeout(State = #state { backing_queue = BQ }) -> - run_backing_queue(BQ, fun (M, BQS) -> M:idle_timeout(BQS) end, State). +backing_queue_timeout(State = #state { backing_queue = BQ }) -> + run_backing_queue(BQ, fun (M, BQS) -> M:timeout(BQS) end, State). ensure_sync_timer(State = #state { sync_timer_ref = undefined }) -> {ok, TRef} = timer:apply_after( |