1
This commit is contained in:
parent
452f337b9f
commit
7adbdd97bc
@ -20,6 +20,7 @@ class RequestTarget
|
||||
{
|
||||
public:
|
||||
long long context_id = 0;
|
||||
int socket_handle = 0;
|
||||
std::string account_id;
|
||||
f8::MsgHdr* hdr_copy = nullptr;
|
||||
f8::TimerWp timer_wp;
|
||||
@ -60,14 +61,14 @@ void MasterMgr::_SS_MS_ResponseTargetServer(f8::MsgHdr& hdr, const ss::SS_MS_Res
|
||||
msg.port()
|
||||
);
|
||||
if (conn) {
|
||||
RemoveRequest(req->hdr_copy->socket_handle);
|
||||
RemoveRequest(req->socket_handle);
|
||||
conn->ForwardClientMsgEx(req->hdr_copy);
|
||||
return;
|
||||
} else {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
RemoveRequest(req->hdr_copy->socket_handle);
|
||||
RemoveRequest(req->socket_handle);
|
||||
}
|
||||
}
|
||||
|
||||
@ -107,6 +108,7 @@ void MasterMgr::RequestTargetServer(f8::MsgHdr& hdr,
|
||||
++curr_context_id_;
|
||||
auto req = std::make_shared<RequestTarget>();
|
||||
req->context_id = curr_context_id_;
|
||||
req->socket_handle = hdr.socket_handle;
|
||||
req->hdr_copy = hdr.Clone();
|
||||
|
||||
ss::SS_WSP_RequestTargetServer msg;
|
||||
@ -128,13 +130,13 @@ void MasterMgr::RequestTargetServer(f8::MsgHdr& hdr,
|
||||
if (a8::TIMER_EXEC_EVENT == event) {
|
||||
MasterMgr::Instance()->RemoveRequest
|
||||
(
|
||||
req->hdr_copy->socket_handle
|
||||
req->socket_handle
|
||||
);
|
||||
long long req_handle_time = a8::XGetTickCount() - req->req_tick;
|
||||
if (req_handle_time > App::Instance()->perf.max_login_time) {
|
||||
App::Instance()->perf.max_login_time = req_handle_time;
|
||||
}
|
||||
DownStreamMgr::Instance()->AddPendingAccount(req->account_id, req->hdr_copy->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