fix invalid read
This commit is contained in:
parent
6ca51aa0cd
commit
92fc12611b
|
@ -392,7 +392,7 @@ int32_t dmInitClient(SDnode *pDnode) {
|
|||
rpcInit.notWaitAvaliableConn = 0;
|
||||
|
||||
(void)taosVersionStrToInt(version, &(rpcInit.compatibilityVer));
|
||||
rpcInit.startReadTimer = 1;
|
||||
rpcInit.startReadTimer = 0;
|
||||
pTrans->clientRpc = rpcOpen(&rpcInit);
|
||||
if (pTrans->clientRpc == NULL) {
|
||||
dError("failed to init dnode rpc client since:%s", tstrerror(terrno));
|
||||
|
@ -435,7 +435,7 @@ int32_t dmInitStatusClient(SDnode *pDnode) {
|
|||
rpcInit.supportBatch = 1;
|
||||
rpcInit.batchSize = 8 * 1024;
|
||||
rpcInit.timeToGetConn = tsTimeToGetAvailableConn;
|
||||
rpcInit.startReadTimer = 1;
|
||||
rpcInit.startReadTimer = 0;
|
||||
(void)taosVersionStrToInt(version, &(rpcInit.compatibilityVer));
|
||||
|
||||
pTrans->statusRpc = rpcOpen(&rpcInit);
|
||||
|
@ -482,7 +482,7 @@ int32_t dmInitSyncClient(SDnode *pDnode) {
|
|||
rpcInit.batchSize = 8 * 1024;
|
||||
rpcInit.timeToGetConn = tsTimeToGetAvailableConn;
|
||||
(void)taosVersionStrToInt(version, &(rpcInit.compatibilityVer));
|
||||
rpcInit.startReadTimer = 1;
|
||||
rpcInit.startReadTimer = 0;
|
||||
pTrans->syncRpc = rpcOpen(&rpcInit);
|
||||
if (pTrans->syncRpc == NULL) {
|
||||
dError("failed to init dnode rpc sync client since %s", tstrerror(terrno));
|
||||
|
|
|
@ -657,6 +657,11 @@ void cliConnCheckTimoutMsg(SCliConn* conn) {
|
|||
QUEUE_INIT(&set);
|
||||
SCliThrd* pThrd = conn->hostThrd;
|
||||
STrans* pInst = pThrd->pInst;
|
||||
|
||||
if (pInst->startReadTimer == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (transQueueSize(&conn->reqsSentOut) == 0) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue