From 24678070d451711a03a69ca3a7aa6e695efeff28 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期五, 12 三月 2021 19:05:12 +0800
Subject: [PATCH] upate
---
src/socket/shm_socket.cpp | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/socket/shm_socket.cpp b/src/socket/shm_socket.cpp
index 94b3fdd..4f5f4d9 100644
--- a/src/socket/shm_socket.cpp
+++ b/src/socket/shm_socket.cpp
@@ -46,7 +46,7 @@
if (tmp_ptr == NULL || tmp_ptr == (void *)1 ) {
- queue = new LockFreeQueue<shm_packet_t>(16);
+ queue = new LockFreeQueue<shm_packet_t>(1024);
hashtable_put(hashtable, key, (void *)queue);
hashtable_unlock(hashtable);
return queue;
@@ -600,6 +600,10 @@
sendpak->key = sockt->key;
rv = remoteQueue->push(*sendpak, timeout, flag);
+
+ if(rv != 0) {
+ mm_free(sendpak->buf);
+ }
if(rv == ETIMEDOUT) {
return EBUS_TIMEOUT;
}
--
Gitblit v1.8.0