Network shutdown optimization
This commit is contained in:
parent
2c952a54d2
commit
d612b8b8de
2 changed files with 56 additions and 7 deletions
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
#include <condition_variable>
|
||||
#include "RGBController.h"
|
||||
#include "NetworkProtocol.h"
|
||||
#include "net_port.h"
|
||||
|
|
@ -93,7 +94,7 @@ private:
|
|||
net_port port;
|
||||
std::string port_ip;
|
||||
unsigned short port_num;
|
||||
bool client_active;
|
||||
std::atomic<bool> client_active;
|
||||
bool controller_data_received;
|
||||
bool server_connected;
|
||||
bool server_initialized;
|
||||
|
|
@ -104,6 +105,9 @@ private:
|
|||
bool change_in_progress;
|
||||
std::mutex send_in_progress;
|
||||
|
||||
std::mutex connection_mutex;
|
||||
std::condition_variable connection_cv;
|
||||
|
||||
std::thread * ConnectionThread;
|
||||
std::thread * ListenThread;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue