Skip to content

Commit

Permalink
Merge pull request #1781 from taosdata/hotfix/idpool
Browse files Browse the repository at this point in the history
maxId is from 1 to maxSession
  • Loading branch information
hjxilinx committed May 3, 2020
2 parents 94c8016 + 0281b70 commit 89d9d62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rpc/src/rpcMain.c
Expand Up @@ -217,7 +217,7 @@ void *rpcOpen(const SRpcInit *pInit) {
pRpc->numOfThreads = pInit->numOfThreads>TSDB_MAX_RPC_THREADS ? TSDB_MAX_RPC_THREADS:pInit->numOfThreads;
pRpc->localPort = pInit->localPort;
pRpc->afp = pInit->afp;
pRpc->sessions = pInit->sessions;
pRpc->sessions = pInit->sessions+1;
if (pInit->user) strcpy(pRpc->user, pInit->user);
if (pInit->secret) strcpy(pRpc->secret, pInit->secret);
if (pInit->ckey) strcpy(pRpc->ckey, pInit->ckey);
Expand Down Expand Up @@ -245,7 +245,7 @@ void *rpcOpen(const SRpcInit *pInit) {
return NULL;
}

pRpc->idPool = taosInitIdPool(pRpc->sessions);
pRpc->idPool = taosInitIdPool(pRpc->sessions-1);
if (pRpc->idPool == NULL) {
tError("%s failed to init ID pool", pRpc->label);
rpcClose(pRpc);
Expand Down

0 comments on commit 89d9d62

Please sign in to comment.