From d89ff0ad812cdf178b911843bc3e8c04b2f00845 Mon Sep 17 00:00:00 2001 From: lichao <lichao@aiotlink.com> Date: 星期四, 03 六月 2021 10:29:51 +0800 Subject: [PATCH] center remove old shm on start. --- src/defs.cpp | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/defs.cpp b/src/defs.cpp index 694e2c5..9402b27 100644 --- a/src/defs.cpp +++ b/src/defs.cpp @@ -175,6 +175,8 @@ auto pmeta = GetBHomeMeta(); if (pmeta && pmeta->tag_ == kMetaInfoTag) { + // remove old shm + SharedMemory::Remove(BHomeShmName()); ++pmeta->shm_id_; // inc shm id return true; // already exist. } else { -- Gitblit v1.8.0