From c247242bf4762b8a58809e33b6ed87b02febc67a Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 8 Jul 2025 12:38:15 -0400 Subject: [PATCH] MT#63171 XMLRPC2DI: proper shutdown Use AmEventQueueThreaded to facilitate thread shutdown Change-Id: I498595fd1ac95d8862cec2eec2047fc04dea055a --- apps/xmlrpc2di/XMLRPC2DI.cpp | 2 +- apps/xmlrpc2di/XMLRPC2DI.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/xmlrpc2di/XMLRPC2DI.cpp b/apps/xmlrpc2di/XMLRPC2DI.cpp index 152b2c90..6e3a97df 100644 --- a/apps/xmlrpc2di/XMLRPC2DI.cpp +++ b/apps/xmlrpc2di/XMLRPC2DI.cpp @@ -329,7 +329,7 @@ XMLRPC2DIServer::XMLRPC2DIServer(unsigned int port, string &direct_export, bool multithreaded, unsigned int threads) - : AmEventQueue(this), + : AmEventQueueThread(this), port(port), bind_ip(bind_ip), running(false), diff --git a/apps/xmlrpc2di/XMLRPC2DI.h b/apps/xmlrpc2di/XMLRPC2DI.h index fb4576ca..222ce91a 100644 --- a/apps/xmlrpc2di/XMLRPC2DI.h +++ b/apps/xmlrpc2di/XMLRPC2DI.h @@ -96,8 +96,7 @@ struct DIMethodProxy : public XmlRpcServerMethod }; class XMLRPC2DIServer -: public AmEventQueue, - public AmThread, +: public AmEventQueueThread, public AmEventHandler { XmlRpcServer* s; @@ -135,6 +134,8 @@ class XMLRPC2DIServer unsigned int threads = 5); ~XMLRPC2DIServer() { + stop(); + join(); if (s) { delete s; }