From b28c685ee3cb2f06b4055a4f2c7a5ddf3a1a80e4 Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Mon, 5 Feb 2024 12:32:01 -0500 Subject: [PATCH] add missing documentation; properly annotate time value; add missing thread join wait; --- src/fne/HostFNE.cpp | 5 ++++- src/fne/network/FNENetwork.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/fne/HostFNE.cpp b/src/fne/HostFNE.cpp index 58165d33..f7fc1ca4 100644 --- a/src/fne/HostFNE.cpp +++ b/src/fne/HostFNE.cpp @@ -189,7 +189,7 @@ int HostFNE::run() if (m_network != nullptr) { while (!g_killed) { m_network->processNetwork(); - Thread::sleep(5); + Thread::sleep(5U); } } }); @@ -226,6 +226,9 @@ int HostFNE::run() Thread::sleep(1U); } + // shutdown threads + networkLoop.wait(); + if (m_network != nullptr) { m_network->close(); delete m_network; diff --git a/src/fne/network/FNENetwork.h b/src/fne/network/FNENetwork.h index 603b2467..23f27beb 100644 --- a/src/fne/network/FNENetwork.h +++ b/src/fne/network/FNENetwork.h @@ -145,7 +145,7 @@ namespace network // --------------------------------------------------------------------------- // Structure Declaration - // + // Represents the data required for a peer ACL update request thread. // --------------------------------------------------------------------------- struct ACLUpdateRequest {