From 6c32e1a482c14412108675ec78f49ebe4f94a374 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期四, 07 一月 2021 12:04:03 +0800
Subject: [PATCH] update
---
src/socket/net_mod_server_socket.cpp | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/socket/net_mod_server_socket.cpp b/src/socket/net_mod_server_socket.cpp
index 46c3bce..cccbe9e 100644
--- a/src/socket/net_mod_server_socket.cpp
+++ b/src/socket/net_mod_server_socket.cpp
@@ -25,6 +25,8 @@
if(response_buf == NULL) {
err_exit(errno, "NetModServerSocket::NetModServerSocket malloc");
}
+
+ shmModSocket.force_bind(SHM_NET_PROXY_KEY);
}
@@ -234,13 +236,13 @@
if(request_head.timeout > 0) {
timeout.tv_sec = request_head.timeout / 1000;
timeout.tv_nsec = (request_head.timeout - timeout.tv_sec * 1000) * 10e6;
- ret = shmModSocket.pub_timeout((char*)topic_buf, request_head.topic_length, buf, request_head.content_length, BUS_KEY, &timeout);
+ ret = shmModSocket.pub_timeout((char*)topic_buf, request_head.topic_length, buf, request_head.content_length, SHM_BUS_KEY, &timeout);
}
else if(request_head.timeout == 0) {
- ret = shmModSocket.pub_nowait((char*)topic_buf, request_head.topic_length, buf, request_head.content_length, BUS_KEY);
+ ret = shmModSocket.pub_nowait((char*)topic_buf, request_head.topic_length, buf, request_head.content_length, SHM_BUS_KEY);
}
else if(request_head.timeout == -1) {
- ret = shmModSocket.pub((char*)topic_buf, request_head.topic_length, buf, request_head.content_length, BUS_KEY);
+ ret = shmModSocket.pub((char*)topic_buf, request_head.topic_length, buf, request_head.content_length, SHM_BUS_KEY);
}
response_head.code = ret;
response_head.content_length = 0;
--
Gitblit v1.8.0