This commit is contained in:
aozhiwei 2021-12-03 19:08:28 +08:00
parent 0c57ca6934
commit ee6b7fdd7f
2 changed files with 7 additions and 3 deletions

View File

@ -13,6 +13,7 @@
#include "framework/cpp/netmsghandler.h"
#include "app.h"
#include "GCListener.h"
#include "jsondatamgr.h"
#include "handlermgr.h"
#include "perfmonitor.h"
@ -75,6 +76,7 @@ void App::Init(int argc, char* argv[])
f8::MsgQueue::Instance()->Init();
f8::TGLog::Instance()->Init(a8::Format(PROJ_NAME_FMT, {}), false);
JsonDataMgr::Instance()->Init();
GCListener::Instance()->Init();
uuid.SetMachineId(instance_id);
MetaMgr::Instance()->Init();
@ -86,6 +88,7 @@ void App::UnInit()
if (terminated) {
return;
}
GCListener::Instance()->UnInit();
MetaMgr::Instance()->UnInit();
JsonDataMgr::Instance()->UnInit();
f8::MsgQueue::Instance()->UnInit();

View File

@ -6,6 +6,7 @@
#include "app.h"
#include "perfmonitor.h"
#include "GCListener.h"
static void _GMOpsSelfChecking(f8::JsonHttpRequest* request)
{
@ -42,7 +43,7 @@ void HandlerMgr::ProcGMMsg(unsigned long saddr, int sockhandle,
const std::string& url, const std::string& querystr)
{
if (url != "/webapp/index.php") {
//IMListener::Instance()->SendText(sockhandle, a8::HttpResponse(404, ""));
GCListener::Instance()->SendText(sockhandle, a8::HttpResponse(404, ""));
return;
}
@ -64,12 +65,12 @@ void HandlerMgr::ProcGMMsg(unsigned long saddr, int sockhandle,
if (!request->pending){
std::string response;
request->resp_xobj->ToJsonStr(response);
//IMListener::Instance()->SendText(sockhandle, a8::HttpResponse(response));
GCListener::Instance()->SendText(sockhandle, a8::HttpResponse(response));
delete request;
}
} else {
//IMListener::Instance()->SendText(sockhandle, a8::HttpResponse("{}"));
GCListener::Instance()->SendText(sockhandle, a8::HttpResponse("{}"));
}
}