mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Idle connection timeout config for both peer and user connections. (#158)
This commit is contained in:
committed by
GitHub
parent
fe24ef2388
commit
bf710c6bde
@@ -87,6 +87,8 @@ namespace conf
|
||||
cfg.roundtime = 1000;
|
||||
cfg.pubport = 8080;
|
||||
cfg.peerdiscoverytime = 30000;
|
||||
cfg.pubidletimeout = 0;
|
||||
cfg.peeridletimeout = 120;
|
||||
|
||||
cfg.msgforwarding = false;
|
||||
cfg.dynamicpeerdiscovery = false;
|
||||
@@ -284,6 +286,9 @@ namespace conf
|
||||
cfg.roundtime = d["roundtime"].as<uint16_t>();
|
||||
cfg.peerdiscoverytime = d["peerdiscoverytime"].as<uint16_t>();
|
||||
|
||||
cfg.peeridletimeout = d["peeridletimeout"].as<uint16_t>();
|
||||
cfg.pubidletimeout = d["pubidletimeout"].as<uint16_t>();
|
||||
|
||||
cfg.pubmaxsize = d["pubmaxsize"].as<uint64_t>();
|
||||
cfg.pubmaxcpm = d["pubmaxcpm"].as<uint64_t>();
|
||||
cfg.pubmaxbadmpm = d["pubmaxbadmpm"].as<uint64_t>();
|
||||
@@ -364,6 +369,9 @@ namespace conf
|
||||
d.insert_or_assign("roundtime", cfg.roundtime);
|
||||
d.insert_or_assign("peerdiscoverytime", cfg.peerdiscoverytime);
|
||||
|
||||
d.insert_or_assign("peeridletimeout", cfg.peeridletimeout);
|
||||
d.insert_or_assign("pubidletimeout", cfg.pubidletimeout);
|
||||
|
||||
d.insert_or_assign("pubmaxsize", cfg.pubmaxsize);
|
||||
d.insert_or_assign("pubmaxcpm", cfg.pubmaxcpm);
|
||||
d.insert_or_assign("pubmaxbadmpm", cfg.pubmaxbadmpm);
|
||||
|
||||
Reference in New Issue
Block a user