summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_memory_monitor.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rabbit_memory_monitor.erl b/src/rabbit_memory_monitor.erl
index 13cda4ba2f..d34909a1e6 100644
--- a/src/rabbit_memory_monitor.erl
+++ b/src/rabbit_memory_monitor.erl
@@ -264,15 +264,15 @@ inform_queues(ShouldInform, DesiredDurationAvg, Durations) ->
%% In normal use, we only inform queues immediately if the desired
%% duration has decreased, we want to ensure timely paging.
should_inform_predicate(false) -> fun (infinity, infinity) -> false;
- (infinity, _D2) -> false;
- (_D1, infinity) -> true;
- (D1, D2) -> D1 < D2
+ (infinity, _D2) -> true;
+ (_D1, infinity) -> false;
+ (D1, D2) -> D1 > D2
end;
%% When the disk alarm has gone off though, we want to inform queues
%% immediately if the desired duration has *increased* - we want to
%% ensure timely stopping paging.
should_inform_predicate(true) -> fun (infinity, infinity) -> false;
- (infinity, _D2) -> true;
- (_D1, infinity) -> false;
- (D1, D2) -> D1 > D2
+ (infinity, _D2) -> false;
+ (_D1, infinity) -> true;
+ (D1, D2) -> D1 < D2
end.