1
This commit is contained in:
parent
765b0b95cf
commit
e215104358
@ -97,7 +97,7 @@ void HandlerMgr::ProcGMMsg(unsigned long saddr, int sockhandle,
|
|||||||
[sockhandle] (const a8::Args& args)
|
[sockhandle] (const a8::Args& args)
|
||||||
{
|
{
|
||||||
std::string data = args.Get<std::string>(0);
|
std::string data = args.Get<std::string>(0);
|
||||||
GCListener::Instance()->SendText(sockhandle, a8::HttpResponse(data));
|
GCListener::Instance()->SendText(sockhandle, data);
|
||||||
});
|
});
|
||||||
itr->second(request);
|
itr->second(request);
|
||||||
} else {
|
} else {
|
||||||
|
@ -58,6 +58,15 @@ void MasterMgr::_SS_MS_ResponseTargetServer(f8::MsgHdr* hdr, const ss::SS_MS_Res
|
|||||||
{
|
{
|
||||||
auto req = GetRequestByContextId(msg.context_id());
|
auto req = GetRequestByContextId(msg.context_id());
|
||||||
if (req) {
|
if (req) {
|
||||||
|
#ifdef DEBUG
|
||||||
|
a8::XPrintf("error_code:%d error_msg:%s host:%s port:%d\n",
|
||||||
|
{
|
||||||
|
msg.error_code(),
|
||||||
|
msg.error_msg(),
|
||||||
|
msg.host(),
|
||||||
|
msg.port()
|
||||||
|
});
|
||||||
|
#endif
|
||||||
if (msg.error_code() == 0) {
|
if (msg.error_code() == 0) {
|
||||||
std::weak_ptr<UpStream> conn = UpStreamMgr::Instance()->RecreateUpStream
|
std::weak_ptr<UpStream> conn = UpStreamMgr::Instance()->RecreateUpStream
|
||||||
(
|
(
|
||||||
@ -99,6 +108,15 @@ void MasterMgr::RequestTargetServer(f8::MsgHdr* hdr,
|
|||||||
int is_reconnect,
|
int is_reconnect,
|
||||||
int proto_version)
|
int proto_version)
|
||||||
{
|
{
|
||||||
|
#ifdef DEBUG
|
||||||
|
a8::XPrintf("RequestTargetServer team_id:%s account_id:%s server_info:%s is_reconnect:%d\n",
|
||||||
|
{
|
||||||
|
team_id,
|
||||||
|
account_id,
|
||||||
|
server_info,
|
||||||
|
is_reconnect
|
||||||
|
});
|
||||||
|
#endif
|
||||||
if (GetRequestBySocket(hdr->socket_handle)) {
|
if (GetRequestBySocket(hdr->socket_handle)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -154,21 +172,24 @@ void MasterMgr::RequestTargetServer(f8::MsgHdr* hdr,
|
|||||||
[req] (int event, const a8::Args* args)
|
[req] (int event, const a8::Args* args)
|
||||||
{
|
{
|
||||||
if (a8::TIMER_EXEC_EVENT == event) {
|
if (a8::TIMER_EXEC_EVENT == event) {
|
||||||
MasterMgr::Instance()->RemoveRequest
|
MasterMgr::Instance()->RemoveRequest(req->socket_handle);
|
||||||
(
|
|
||||||
req->socket_handle
|
|
||||||
);
|
|
||||||
long long req_handle_time = a8::XGetTickCount() - req->req_tick;
|
long long req_handle_time = a8::XGetTickCount() - req->req_tick;
|
||||||
if (req_handle_time > App::Instance()->GetPerf().max_login_time) {
|
if (req_handle_time > App::Instance()->GetPerf().max_login_time) {
|
||||||
App::Instance()->GetPerf().max_login_time = req_handle_time;
|
App::Instance()->GetPerf().max_login_time = req_handle_time;
|
||||||
}
|
}
|
||||||
DownStreamMgr::Instance()->AddPendingAccount(req->account_id, req->socket_handle, req->req_tick);
|
DownStreamMgr::Instance()->AddPendingAccount
|
||||||
|
(req->account_id,
|
||||||
|
req->socket_handle,
|
||||||
|
req->req_tick);
|
||||||
} else if (ALLOC_TARGET_SERVER_SUCCESS_TIMER_EVENT == event) {
|
} else if (ALLOC_TARGET_SERVER_SUCCESS_TIMER_EVENT == event) {
|
||||||
long long req_handle_time = a8::XGetTickCount() - req->req_tick;
|
long long req_handle_time = a8::XGetTickCount() - req->req_tick;
|
||||||
if (req_handle_time > App::Instance()->GetPerf().max_login_time) {
|
if (req_handle_time > App::Instance()->GetPerf().max_login_time) {
|
||||||
App::Instance()->GetPerf().max_login_time = req_handle_time;
|
App::Instance()->GetPerf().max_login_time = req_handle_time;
|
||||||
}
|
}
|
||||||
DownStreamMgr::Instance()->AddPendingAccount(req->account_id, req->socket_handle, req->req_tick);
|
DownStreamMgr::Instance()->AddPendingAccount
|
||||||
|
(req->account_id,
|
||||||
|
req->socket_handle,
|
||||||
|
req->req_tick);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user