Idle connection timeout config for both peer and user connections. (#158)

This commit is contained in:
Savinda Senevirathne
2020-11-20 19:48:45 +05:30
committed by GitHub
parent fe24ef2388
commit bf710c6bde
10 changed files with 32 additions and 13 deletions

View File

@@ -20,7 +20,7 @@ namespace usr
// Holds global connected-users and related objects.
connected_context ctx;
uint64_t metric_thresholds[4];
uint64_t metric_thresholds[5];
bool init_success = false;
/**
@@ -33,6 +33,7 @@ namespace usr
metric_thresholds[1] = 0; // This metric doesn't apply to user context.
metric_thresholds[2] = 0; // This metric doesn't apply to user context.
metric_thresholds[3] = conf::cfg.pubmaxbadmpm;
metric_thresholds[4] = conf::cfg.pubidletimeout;
// Start listening for incoming user connections.
if (start_listening() == -1)