修复 问题
This commit is contained in:
parent
4f4175ac90
commit
92bba61891
@ -23,7 +23,6 @@
|
||||
|
||||
#include "framework/cpp/msgqueue.h"
|
||||
#include "framework/cpp/tglog.h"
|
||||
#include "framework/cpp/httpclientpool.h"
|
||||
|
||||
struct MsgNode
|
||||
{
|
||||
@ -56,7 +55,6 @@ static void SavePerfLog()
|
||||
});
|
||||
App::Instance()->perf.max_run_delay_time = 0;
|
||||
App::Instance()->perf.max_timer_idle = 0;
|
||||
f8::HttpClientPool::Instance()->max_request_delay = 0;
|
||||
}
|
||||
|
||||
void App::Init(int argc, char* argv[])
|
||||
@ -97,7 +95,6 @@ void App::Init(int argc, char* argv[])
|
||||
a8::Timer::Instance()->Init();
|
||||
f8::MsgQueue::Instance()->Init();
|
||||
f8::TGLog::Instance()->Init(a8::Format(PROJ_NAME_FMT, {GAME_ID}), false);
|
||||
f8::HttpClientPool::Instance()->Init(10);
|
||||
JsonDataMgr::Instance()->Init();
|
||||
uuid.SetMachineId((node_id - 1) * MAX_NODE_ID + instance_id);
|
||||
GGListener::Instance()->Init();
|
||||
@ -124,7 +121,6 @@ void App::UnInit()
|
||||
}
|
||||
GGListener::Instance()->Init();
|
||||
JsonDataMgr::Instance()->UnInit();
|
||||
f8::HttpClientPool::Instance()->UnInit();
|
||||
f8::MsgQueue::Instance()->UnInit();
|
||||
a8::Timer::Instance()->UnInit();
|
||||
HandlerMgr::Instance()->UnInit();
|
||||
|
@ -120,7 +120,14 @@ GSNode* GSMgr::AllocNode()
|
||||
return nullptr;
|
||||
}
|
||||
size_t rnd = std::min((size_t)5, node_sorted_list_.size());
|
||||
return node_sorted_list_[rand() % rnd];
|
||||
int idx = rand() % rnd;
|
||||
while (idx >= 0) {
|
||||
if (node_sorted_list_[idx]->servicing) {
|
||||
return node_sorted_list_[idx];
|
||||
}
|
||||
--idx;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void GSMgr::RearrangeNode()
|
||||
|
Loading…
x
Reference in New Issue
Block a user