Networking fixes related to peer connectivity issues (#384)

This commit is contained in:
Kithmini Gunawardhana
2023-09-23 10:03:45 +05:30
committed by GitHub
parent 6a2384cd03
commit e7e1268a99
23 changed files with 393 additions and 98 deletions

View File

@@ -862,10 +862,7 @@ namespace conf
*/
int persist_updated_configs()
{
const bool contains_updated_config = cfg.mesh.peer_discovery.enabled;
bool changes_made = false;
if (!contains_updated_config)
return 0;
// Read the original config into a temp struct.
hp_config temp_cfg;
@@ -875,7 +872,7 @@ namespace conf
// Apply any actual changes to the temp struct.
// Apply known peer list updates.
if (conf::cfg.mesh.peer_discovery.enabled && !cfg.mesh.known_peers.empty())
if (!cfg.mesh.known_peers.empty())
{
temp_cfg.mesh.known_peers = cfg.mesh.known_peers;
changes_made = true;