Stop the wiiload server in ON_APPLICATION_ENDS instead of ON_APPLICATION_REQUESTS_EXIT hook

This commit is contained in:
Maschell 2022-10-06 12:19:26 +02:00
parent 7f963d1900
commit 4ed731a3ef

View File

@ -22,6 +22,7 @@ INITIALIZE_PLUGIN() {
} else { } else {
gLibRPXLoaderInitDone = true; gLibRPXLoaderInitDone = true;
} }
thread = nullptr;
} }
/* Entry point */ /* Entry point */
@ -38,7 +39,7 @@ ON_APPLICATION_START() {
thread = new TcpReceiver(4299); thread = new TcpReceiver(4299);
} }
ON_APPLICATION_REQUESTS_EXIT() { ON_APPLICATION_ENDS() {
DEBUG_FUNCTION_LINE("Stop wiiload thread"); DEBUG_FUNCTION_LINE("Stop wiiload thread");
if (thread != nullptr) { if (thread != nullptr) {
delete thread; delete thread;