Move RGBController base destructor functionality into RGBController::Shutdown() so that update thread can be stopped before deleting the controller. Shutdown() must be called in every RGBController implementation before deleting the controller. Also some fixes to the NetworkServer to avoid deadlocking and disconnect issues

This commit is contained in:
Adam Honse
2026-02-02 17:10:37 -06:00
parent 693a8e5541
commit c4dd171397
332 changed files with 792 additions and 37 deletions

View File

@@ -238,6 +238,8 @@ RGBController_HyperXAlloyElite2::RGBController_HyperXAlloyElite2(HyperXAlloyElit
RGBController_HyperXAlloyElite2::~RGBController_HyperXAlloyElite2()
{
Shutdown();
keepalive_thread_run = false;
keepalive_thread->join();
delete keepalive_thread;

View File

@@ -251,6 +251,8 @@ RGBController_HyperXAlloyElite::RGBController_HyperXAlloyElite(HyperXAlloyEliteC
RGBController_HyperXAlloyElite::~RGBController_HyperXAlloyElite()
{
Shutdown();
keepalive_thread_run = false;
keepalive_thread->join();
delete keepalive_thread;

View File

@@ -192,6 +192,8 @@ RGBController_HyperXAlloyFPS::RGBController_HyperXAlloyFPS(HyperXAlloyFPSControl
RGBController_HyperXAlloyFPS::~RGBController_HyperXAlloyFPS()
{
Shutdown();
keepalive_thread_run = false;
keepalive_thread->join();
delete keepalive_thread;

View File

@@ -245,6 +245,8 @@ RGBController_HyperXAlloyOrigins60and65::RGBController_HyperXAlloyOrigins60and65
RGBController_HyperXAlloyOrigins60and65::~RGBController_HyperXAlloyOrigins60and65()
{
Shutdown();
keepalive_thread_run = 0;
keepalive_thread->join();
delete keepalive_thread;

View File

@@ -213,6 +213,8 @@ RGBController_HyperXAlloyOrigins::RGBController_HyperXAlloyOrigins(HyperXAlloyOr
RGBController_HyperXAlloyOrigins::~RGBController_HyperXAlloyOrigins()
{
Shutdown();
keepalive_thread_run = 0;
keepalive_thread->join();
delete keepalive_thread;

View File

@@ -128,6 +128,8 @@ RGBController_HyperXAlloyOriginsCore::RGBController_HyperXAlloyOriginsCore(Hyper
RGBController_HyperXAlloyOriginsCore::~RGBController_HyperXAlloyOriginsCore()
{
Shutdown();
keepalive_thread_run = 0;
keepalive_thread->join();
delete keepalive_thread;