summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Mazzoli <francesco@rabbitmq.com>2012-02-09 16:17:23 +0000
committerFrancesco Mazzoli <francesco@rabbitmq.com>2012-02-09 16:17:23 +0000
commitf8763d64de0c28f608bb10d22c64d8725deb1990 (patch)
tree4b52535516380f74186c9bc480a43fda87de6a71
parent5e2a41a417b3c7311c3fa1293ca899cfc15b4f44 (diff)
downloadrabbitmq-server-f8763d64de0c28f608bb10d22c64d8725deb1990.tar.gz
Changed needs_sync/1 patterns order.
-rw-r--r--src/file_handle_cache.erl5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/file_handle_cache.erl b/src/file_handle_cache.erl
index 6f381817..a362c94f 100644
--- a/src/file_handle_cache.erl
+++ b/src/file_handle_cache.erl
@@ -376,9 +376,8 @@ sync(Ref) ->
needs_sync(Ref) ->
with_handles(
[Ref],
- fun ([#handle { write_buffer = [_|_] }]) -> true;
- ([#handle { is_dirty = true }]) -> true;
- ([_Handle]) -> false
+ fun ([#handle { is_dirty = false, write_buffer = [] }]) -> false;
+ ([_Handle]) -> true
end).
position(Ref, NewOffset) ->