修复全局变量构造先后顺序导致启动崩溃的问题

This commit is contained in:
夏楚 2023-04-06 16:16:28 +08:00 committed by GitHub
parent 7fcd88d02a
commit 599208dd6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -271,7 +271,7 @@ static void sendReport() {
} }
static toolkit::onceToken s_token([]() { static toolkit::onceToken s_token([]() {
NoticeCenter::Instance().addListener(nullptr, EventPollerPool::kOnStarted, [](EventPollerPool &pool, size_t &size) { NoticeCenter::Instance().addListener(nullptr, "kBroadcastEventPollerPoolStarted", [](EventPollerPool &pool, size_t &size) {
// 第一次汇报在程序启动后5分钟 // 第一次汇报在程序启动后5分钟
pool.getPoller()->doDelayTask(5 * 60 * 1000, []() { pool.getPoller()->doDelayTask(5 * 60 * 1000, []() {
sendReport(); sendReport();