fix: fix double send resp
This commit is contained in:
parent
b8b2b8a23a
commit
27c12787f7
|
@ -160,7 +160,6 @@ static int32_t vmPutMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pMsg, EQueueType qtyp
|
||||||
dGError("vgId:%d, msg:%p failed to put into vnode queue since %s, type:%s qtype:%d contLen:%d", pHead->vgId, pMsg,
|
dGError("vgId:%d, msg:%p failed to put into vnode queue since %s, type:%s qtype:%d contLen:%d", pHead->vgId, pMsg,
|
||||||
terrstr(), TMSG_INFO(pMsg->msgType), qtype, pHead->contLen);
|
terrstr(), TMSG_INFO(pMsg->msgType), qtype, pHead->contLen);
|
||||||
terrno = (terrno != 0) ? terrno : -1;
|
terrno = (terrno != 0) ? terrno : -1;
|
||||||
vmSendResponse(pMsg);
|
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,6 +88,11 @@ void* rpcOpen(const SRpcInit* pInit) {
|
||||||
|
|
||||||
pRpc->connType = pInit->connType;
|
pRpc->connType = pInit->connType;
|
||||||
pRpc->idleTime = pInit->idleTime;
|
pRpc->idleTime = pInit->idleTime;
|
||||||
|
pRpc->parent = pInit->parent;
|
||||||
|
if (pInit->user) {
|
||||||
|
tstrncpy(pRpc->user, pInit->user, sizeof(pRpc->user));
|
||||||
|
}
|
||||||
|
|
||||||
pRpc->tcphandle =
|
pRpc->tcphandle =
|
||||||
(*taosInitHandle[pRpc->connType])(ip, pInit->localPort, pRpc->label, pRpc->numOfThreads, NULL, pRpc);
|
(*taosInitHandle[pRpc->connType])(ip, pInit->localPort, pRpc->label, pRpc->numOfThreads, NULL, pRpc);
|
||||||
|
|
||||||
|
@ -95,10 +100,6 @@ void* rpcOpen(const SRpcInit* pInit) {
|
||||||
taosMemoryFree(pRpc);
|
taosMemoryFree(pRpc);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
pRpc->parent = pInit->parent;
|
|
||||||
if (pInit->user) {
|
|
||||||
tstrncpy(pRpc->user, pInit->user, sizeof(pRpc->user));
|
|
||||||
}
|
|
||||||
|
|
||||||
int64_t refId = transAddExHandle(transGetInstMgt(), pRpc);
|
int64_t refId = transAddExHandle(transGetInstMgt(), pRpc);
|
||||||
transAcquireExHandle(transGetInstMgt(), refId);
|
transAcquireExHandle(transGetInstMgt(), refId);
|
||||||
|
|
Loading…
Reference in New Issue