From 57aceae597c513c72736dea7efc75d37c315092c Mon Sep 17 00:00:00 2001 From: dapan1121 <89396746@qq.com> Date: Thu, 13 May 2021 16:48:37 +0800 Subject: [PATCH] fix bug --- src/mnode/src/mnodeProfile.c | 5 +++-- src/mnode/src/mnodeShow.c | 4 ---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/mnode/src/mnodeProfile.c b/src/mnode/src/mnodeProfile.c index 17a4282d05..f0ff016694 100644 --- a/src/mnode/src/mnodeProfile.c +++ b/src/mnode/src/mnodeProfile.c @@ -123,8 +123,9 @@ SConnObj *mnodeAccquireConn(int32_t connId, char *user, uint32_t ip, uint16_t po if (/* pConn->ip != ip || */ pConn->port != port /* || strcmp(pConn->user, user) != 0 */) { mDebug("connId:%d, incoming conn user:%s ip:%s:%u, not match exist conn user:%s ip:%s:%u", connId, user, taosIpStr(ip), port, pConn->user, taosIpStr(pConn->ip), pConn->port); - taosCacheRelease(tsMnodeConnCache, (void **)&pConn, false); - return NULL; + pConn->port = port; + //taosCacheRelease(tsMnodeConnCache, (void **)&pConn, false); + //return NULL; } // mDebug("connId:%d, is incoming, user:%s ip:%s:%u", connId, pConn->user, taosIpStr(pConn->ip), pConn->port); diff --git a/src/mnode/src/mnodeShow.c b/src/mnode/src/mnodeShow.c index c0fa6368f3..5fe22826b7 100644 --- a/src/mnode/src/mnodeShow.c +++ b/src/mnode/src/mnodeShow.c @@ -253,10 +253,6 @@ static int32_t mnodeProcessHeartBeatMsg(SMnodeMsg *pMsg) { int32_t connId = htonl(pHBMsg->connId); SConnObj *pConn = mnodeAccquireConn(connId, connInfo.user, connInfo.clientIp, connInfo.clientPort); - if (pConn == NULL) { - pHBMsg->pid = htonl(pHBMsg->pid); - pConn = mnodeCreateConn(connInfo.user, connInfo.clientIp, connInfo.clientPort, pHBMsg->pid, pHBMsg->appName); - } if (pConn == NULL) { // do not close existing links, otherwise -- GitLab