From 4ed731a3ef0081e261eec8993118bb7525a5f340 Mon Sep 17 00:00:00 2001 From: Maschell Date: Thu, 6 Oct 2022 12:19:26 +0200 Subject: [PATCH] Stop the wiiload server in ON_APPLICATION_ENDS instead of ON_APPLICATION_REQUESTS_EXIT hook --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index a922bf0..78805ff 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -22,6 +22,7 @@ INITIALIZE_PLUGIN() { } else { gLibRPXLoaderInitDone = true; } + thread = nullptr; } /* Entry point */ @@ -38,7 +39,7 @@ ON_APPLICATION_START() { thread = new TcpReceiver(4299); } -ON_APPLICATION_REQUESTS_EXIT() { +ON_APPLICATION_ENDS() { DEBUG_FUNCTION_LINE("Stop wiiload thread"); if (thread != nullptr) { delete thread;