Commit 10c75681 authored by FDeppe's avatar FDeppe
Browse files

changed server code to consider vote values of break-requests instead of just counting them

parent b614bcec
......@@ -146,7 +146,7 @@ public class VoteController extends Controller {
case BREAK:
// consider only last 10min
if (v.date.after(tenMinutesAgo)) {
sBreakRequests.value++;
sBreakRequests += v.value;
}
break;
default:
......@@ -159,6 +159,9 @@ public class VoteController extends Controller {
}
}
// prevent invalid counting due to flow of time and consideration-time-interval of votes
sBreakRequests = Math.max(0, sBreakRequests);
// generate statistics
sUsers.value = usersAll.size();
if (usersSpeed.size() > 0) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment