Improve corebill and graylisting. (#154)

This commit is contained in:
Savinda Senevirathne
2020-11-19 08:40:15 +05:30
committed by GitHub
parent f475dcb1fb
commit 9160b2ee15
10 changed files with 129 additions and 75 deletions

View File

@@ -275,12 +275,12 @@ namespace comm
const uint64_t elapsed_time = time_now - t.timestamp;
if (elapsed_time <= t.intervalms && t.counter_value > t.threshold_limit)
{
close();
mark_for_closure();
t.timestamp = 0;
t.counter_value = 0;
LOG_INFO << "Session " << uniqueid << " threshold exceeded. (type:" << threshold_type << " limit:" << t.threshold_limit << ")";
LOG_INFO << "Session " << display_name() << " threshold exceeded. (type:" << threshold_type << " limit:" << t.threshold_limit << ")";
corebill::report_violation(host_address);
}
else if (elapsed_time > t.intervalms)