From d2fa79e037d735712ce677c1c5c6468e1d52e41a Mon Sep 17 00:00:00 2001 From: Scott Lystig Fritchie Date: Mon, 28 Mar 2016 22:07:59 +0900 Subject: [PATCH] Fix arithmetic error in src/machi_file_proxy.erl --- src/machi_file_proxy.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machi_file_proxy.erl b/src/machi_file_proxy.erl index 60ebe84..4e61988 100644 --- a/src/machi_file_proxy.erl +++ b/src/machi_file_proxy.erl @@ -467,7 +467,7 @@ handle_info(tick, State = #state{ writes = {WT, WE}, appends = {AT, AE} }) when Ops > 100 andalso - trunc(((RE+WE+AE) / RT+WT+AT) * 100) > ?TOO_MANY_ERRORS_RATIO -> + trunc(((RE+WE+AE) / (RT+WT+AT)) * 100) > ?TOO_MANY_ERRORS_RATIO -> Errors = RE + WE + AE, lager:notice("Got ~p errors. Shutting down.", [Errors]), {stop, too_many_errors, State};