From 73689afc09ce346f9eb00e02faf7f242e55dc7ee Mon Sep 17 00:00:00 2001 From: fujuntang <fujuntang@smartai.com> Date: 星期四, 09 十二月 2021 19:33:00 +0800 Subject: [PATCH] Add the sync to fix the resource clear issue. --- src/socket/shm_mod_socket.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/socket/shm_mod_socket.cpp b/src/socket/shm_mod_socket.cpp index 6058308..ababb7d 100644 --- a/src/socket/shm_mod_socket.cpp +++ b/src/socket/shm_mod_socket.cpp @@ -301,6 +301,7 @@ int ShmModSocket::pub(const char *topic, int topic_size, const void *content, int content_size, int key, const struct timespec *timeout, int flags) { int ret; bus_head_t head = {}; + topic = trim(const_cast<char *>(topic), 0); memcpy(head.action, "pub", sizeof(head.action)); head.topic_size = topic_size = strlen(topic) + 1; head.content_size = content_size; -- Gitblit v1.8.0