From 8b0a8c644f19e97606dfb06a865f56dbad15f95e Mon Sep 17 00:00:00 2001 From: wangzhengquan <wangzhengquan85@126.com> Date: 星期一, 21 十二月 2020 14:44:45 +0800 Subject: [PATCH] update --- src/socket/net_mod_socket.c | 17 ++++------------- 1 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/socket/net_mod_socket.c b/src/socket/net_mod_socket.c index b0b939f..675c80b 100644 --- a/src/socket/net_mod_socket.c +++ b/src/socket/net_mod_socket.c @@ -107,8 +107,8 @@ mpool = (NetConnPool *)pthread_getspecific(poolKey); if (mpool == NULL) { - /* If first call from this thread, allocate - buffer for thread, and save its location */ + /* If first call from this thread, allocate buffer for thread, and save its location */ + logger->debug("Create connPool"); mpool = new NetConnPool(); if (mpool == NULL) { LoggerFactory::getLogger()->error(errno, "NetModSocket::_sendandrecv_ malloc"); @@ -129,10 +129,10 @@ for (i = 0; i< arrlen; i++) { node = &node_arr[i]; - if(node->host == NULL) { + if(node->host == NULL || strcmp(node->host, "") == 0 ) { // 鏈湴鍙戦�� shmModSocket.sendandrecv(send_buf, send_size, node->key, &recv_buf, &recv_size); - strcpy( ret_arr[n_recv_suc].host,"localshm"); + strcpy( ret_arr[n_recv_suc].host,""); ret_arr[n_recv_suc].port = 0; ret_arr[n_recv_suc].key = node->key; ret_arr[n_recv_suc].content = recv_buf; @@ -558,15 +558,6 @@ return shmModSocket.sendandrecv_nowait(send_buf, send_size, key, recv_buf, recv_size); } - -/** - * 鍚姩bus - * - * @return 0 鎴愬姛锛� 鍏朵粬鍊� 澶辫触鐨勯敊璇爜 -*/ -int NetModSocket::start_bus() { - return shmModSocket.start_bus(); -} /** * 璁㈤槄鎸囧畾涓婚 -- Gitblit v1.8.0