diff options
| -rw-r--r-- | src/rabbit_mirror_queue_slave.erl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rabbit_mirror_queue_slave.erl b/src/rabbit_mirror_queue_slave.erl index e52c570e09..dcc7e5f62c 100644 --- a/src/rabbit_mirror_queue_slave.erl +++ b/src/rabbit_mirror_queue_slave.erl @@ -894,10 +894,9 @@ update_delta_from_master(NewDelta, State = #state { depth_delta = Delta }) -> update_delta(_DeltaChange, State = #state { depth_delta = undefined }) -> State; update_delta(DeltaChange, State = #state { depth_delta = Delta }) -> - %% We intentionally leave out the head where a slave becomes - %% unsynchronised: we assert that can never happen. case {Delta, Delta + DeltaChange} of - {0, 0} -> State; + {0, N} -> 0 = N, %% assertion: we cannot become unsync'ed + State; {_, 0} -> ok = record_synchronised(State#state.q), State #state { depth_delta = 0 }; {_, N} when N > 0 -> State #state { depth_delta = N } |
