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; }