From fc195ce1d00ec3499af5c817395be2d6870faca5 Mon Sep 17 00:00:00 2001 From: Jeff Tao Date: Wed, 24 Jun 2020 10:03:13 +0000 Subject: [PATCH] refCount data type shall be int32_t --- src/rpc/src/rpcMain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index 007a511adf..4a478b3ed8 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -58,7 +58,7 @@ typedef struct { void (*cfp)(SRpcMsg *, SRpcIpSet *); int (*afp)(char *user, char *spi, char *encrypt, char *secret, char *ckey); - int refCount; + int32_t refCount; void *idPool; // handle to ID pool void *tmrCtrl; // handle to timer SHashObj *hash; // handle returned by hash utility @@ -1480,12 +1480,12 @@ static void rpcUnlockConn(SRpcConn *pConn) { static void rpcAddRef(SRpcInfo *pRpc) { - atomic_add_fetch_8(&pRpc->refCount, 1); + atomic_add_fetch_32(&pRpc->refCount, 1); } static void rpcDecRef(SRpcInfo *pRpc) { - if (atomic_sub_fetch_8(&pRpc->refCount, 1) == 0) { + if (atomic_sub_fetch_32(&pRpc->refCount, 1) == 0) { taosHashCleanup(pRpc->hash); taosTmrCleanUp(pRpc->tmrCtrl); taosIdPoolCleanUp(pRpc->idPool); -- GitLab