Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sima committed Dec 8, 2023
1 parent 32512e2 commit 163bc77
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
9 changes: 6 additions & 3 deletions src/cpp/handler/handlerengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1243,6 +1243,9 @@ class HandlerEngine::Private : public QObject
QSet<AcceptWorker*> acceptWorkers;
QSet<Deferred*> deferreds;
Deferred *report;
Connection inspectReqReadyConneciton;
Connection acceptReqReadyConnection;
Connection controlReqReadyConneciton;

Private(HandlerEngine *_q) :
QObject(_q),
Expand Down Expand Up @@ -1325,7 +1328,7 @@ class HandlerEngine::Private : public QObject
inspectServer = new ZrpcManager(this);
inspectServer->setBind(false);
inspectServer->setIpcFileMode(config.ipcFileMode);
inspectServer->requestReady.connect(boost::bind(&Private::inspectServer_requestReady, this));
inspectReqReadyConneciton = inspectServer->requestReady.connect(boost::bind(&Private::inspectServer_requestReady, this));

if(!inspectServer->setServerSpecs(QStringList() << config.inspectSpec))
{
Expand All @@ -1341,7 +1344,7 @@ class HandlerEngine::Private : public QObject
acceptServer = new ZrpcManager(this);
acceptServer->setBind(false);
acceptServer->setIpcFileMode(config.ipcFileMode);
acceptServer->requestReady.connect(boost::bind(&Private::acceptServer_requestReady, this));
acceptReqReadyConnection = acceptServer->requestReady.connect(boost::bind(&Private::acceptServer_requestReady, this));

if(!acceptServer->setServerSpecs(QStringList() << config.acceptSpec))
{
Expand Down Expand Up @@ -1373,7 +1376,7 @@ class HandlerEngine::Private : public QObject
controlServer = new ZrpcManager(this);
controlServer->setBind(true);
controlServer->setIpcFileMode(config.ipcFileMode);
controlServer->requestReady.connect(boost::bind(&Private::controlServer_requestReady, this));
controlReqReadyConneciton = controlServer->requestReady.connect(boost::bind(&Private::controlServer_requestReady, this));

if(!controlServer->setServerSpecs(QStringList() << config.commandSpec))
{
Expand Down
3 changes: 3 additions & 0 deletions src/cpp/handler/handlerengine.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
#include <QObject>
#include <QStringList>
#include <QHostAddress>
#include <boost/signals2.hpp>

using Connection = boost::signals2::scoped_connection;

class HandlerEngine : public QObject
{
Expand Down
6 changes: 4 additions & 2 deletions src/cpp/proxy/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ class Engine::Private : public QObject
ConnectionManager connectionManager;
Updater *updater;
LogUtil::Config logConfig;
Connection changedConnection;
Connection cmdReqReadyConnetion;

Private(Engine *_q) :
QObject(_q),
Expand Down Expand Up @@ -193,7 +195,7 @@ class Engine::Private : public QObject
else
domainMap = new DomainMap(config.routesFile, this);

domainMap->changed.connect(boost::bind(&Private::domainMap_changed, this));
changedConnection = domainMap->changed.connect(boost::bind(&Private::domainMap_changed, this));

zhttpIn = new ZhttpManager(this);
connect(zhttpIn, &ZhttpManager::requestReady, this, &Private::zhttpIn_requestReady);
Expand Down Expand Up @@ -336,7 +338,7 @@ class Engine::Private : public QObject
command = new ZrpcManager(this);
command->setBind(true);
command->setIpcFileMode(config.ipcFileMode);
command->requestReady.connect(boost::bind(&Private::command_requestReady, this));
cmdReqReadyConnetion = command->requestReady.connect(boost::bind(&Private::command_requestReady, this));

if(!command->setServerSpecs(QStringList() << config.commandSpec))
{
Expand Down

0 comments on commit 163bc77

Please sign in to comment.