diff options
| author | Matthew Sackman <matthew@rabbitmq.com> | 2011-03-14 23:34:29 +0000 |
|---|---|---|
| committer | Matthew Sackman <matthew@rabbitmq.com> | 2011-03-14 23:34:29 +0000 |
| commit | dd9651cd08c840cd5067154b9f8c438ab891de04 (patch) | |
| tree | c21470851c22bf0621d73b8864a91e078b9cfb6a | |
| parent | 819b5c1624a4f8b07eafb4c382e25e3153c37dfa (diff) | |
| download | rabbitmq-server-git-dd9651cd08c840cd5067154b9f8c438ab891de04.tar.gz | |
fix
| -rw-r--r-- | src/file_handle_cache.erl | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/file_handle_cache.erl b/src/file_handle_cache.erl index b26bb9884b..e8e86c7cc8 100644 --- a/src/file_handle_cache.erl +++ b/src/file_handle_cache.erl @@ -1149,11 +1149,14 @@ notify_age(CStates, AverageAge) -> end, CStates). notify_age0(Clients, CStates, Required) -> - Notifications = - [CState || CState <- CStates, CState#cstate.callback =/= undefined], - {L1, L2} = lists:split(random:uniform(length(Notifications)), - Notifications), - notify(Clients, Required, L2 ++ L1). + case [CState || CState <- CStates, CState#cstate.callback =/= undefined] of + [] -> + ok; + Notifications -> + {L1, L2} = lists:split(random:uniform(length(Notifications)), + Notifications), + notify(Clients, Required, L2 ++ L1) + end. notify(_Clients, _Required, []) -> ok; |
