From a703510f1bd0598634dfa04b5f54fa533e6c4e03 Mon Sep 17 00:00:00 2001 From: Jeff Tao Date: Tue, 16 Jun 2020 13:40:18 +0000 Subject: [PATCH] tune up code --- src/rpc/src/rpcMain.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index 1558de37ea..989021eb52 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -593,16 +593,11 @@ static void rpcReleaseConn(SRpcConn *pConn) { static void rpcCloseConn(void *thandle) { SRpcConn *pConn = (SRpcConn *)thandle; - if (pConn->user[0] == 0) return; rpcLockConn(pConn); - if (pConn->user[0] == 0) { - rpcUnlockConn(pConn); - return; - } - - rpcReleaseConn(pConn); + if (pConn->user[0]) + rpcReleaseConn(pConn); rpcUnlockConn(pConn); } -- GitLab