diff options
author | Francesco Mazzoli <francesco@rabbitmq.com> | 2012-02-09 16:17:23 +0000 |
---|---|---|
committer | Francesco Mazzoli <francesco@rabbitmq.com> | 2012-02-09 16:17:23 +0000 |
commit | f8763d64de0c28f608bb10d22c64d8725deb1990 (patch) | |
tree | 4b52535516380f74186c9bc480a43fda87de6a71 | |
parent | 5e2a41a417b3c7311c3fa1293ca899cfc15b4f44 (diff) | |
download | rabbitmq-server-f8763d64de0c28f608bb10d22c64d8725deb1990.tar.gz |
Changed needs_sync/1 patterns order.
-rw-r--r-- | src/file_handle_cache.erl | 5 |
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) -> |