From 94a455aba299af5ffe476560d859dfd007cd5467 Mon Sep 17 00:00:00 2001 From: lichao <lichao@aiotlink.com> Date: 星期五, 16 四月 2021 12:13:43 +0800 Subject: [PATCH] fix crash by using normal timeout; add sendq todo. --- box/center.cpp | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/box/center.cpp b/box/center.cpp index 8625f7f..a95e82d 100644 --- a/box/center.cpp +++ b/box/center.cpp @@ -417,7 +417,7 @@ bool AddCenter(const std::string &id, const NodeCenter::Cleaner &cleaner) { - auto center_ptr = std::make_shared<Synced<NodeCenter>>(id, cleaner, 5s, 10s); + auto center_ptr = std::make_shared<Synced<NodeCenter>>(id, cleaner, 60s, 60s * 2); auto MakeReplyer = [](ShmSocket &socket, BHMsgHead &head, const std::string &proc_id) { return [&](auto &&rep_body) { auto reply_head(InitMsgHead(GetType(rep_body), proc_id, head.msg_id())); @@ -496,7 +496,7 @@ SharedMemory &BHomeShm() { - static SharedMemory shm("bhome_default_shm_v0", 1024 * 1024 * 64); + static SharedMemory shm("bhome_default_shm_v0", 1024 * 1024 * 512); return shm; } @@ -530,9 +530,6 @@ sockets_[info.name_] = std::make_shared<ShmSocket>(shm, *(MQId *) info.mqid_.data(), info.mq_len_); } } - -BHCenter::BHCenter() : - BHCenter(BHomeShm()) {} bool BHCenter::Start() { -- Gitblit v1.8.0