commit
425a2e3e73
|
@ -420,7 +420,12 @@ void rpcSendResponse(const SRpcMsg *pRsp) {
|
||||||
SRpcMsg *pMsg = &rpcMsg;
|
SRpcMsg *pMsg = &rpcMsg;
|
||||||
SRpcInfo *pRpc = pConn->pRpc;
|
SRpcInfo *pRpc = pConn->pRpc;
|
||||||
|
|
||||||
if ( pMsg->pCont == NULL ) {
|
if (pConn == NULL) {
|
||||||
|
rpcFreeCont(pMsg->pCont);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pMsg->pCont == NULL) {
|
||||||
pMsg->pCont = rpcMallocCont(0);
|
pMsg->pCont = rpcMallocCont(0);
|
||||||
pMsg->contLen = 0;
|
pMsg->contLen = 0;
|
||||||
}
|
}
|
||||||
|
@ -1021,7 +1026,7 @@ static void rpcReportBrokenLinkToServer(SRpcConn *pConn) {
|
||||||
rpcMsg.pCont = pConn->pReqMsg; // pReqMsg is re-used to store the APP context from server
|
rpcMsg.pCont = pConn->pReqMsg; // pReqMsg is re-used to store the APP context from server
|
||||||
rpcMsg.contLen = pConn->reqMsgLen; // reqMsgLen is re-used to store the APP context length
|
rpcMsg.contLen = pConn->reqMsgLen; // reqMsgLen is re-used to store the APP context length
|
||||||
rpcMsg.ahandle = pConn->ahandle;
|
rpcMsg.ahandle = pConn->ahandle;
|
||||||
rpcMsg.handle = pConn;
|
rpcMsg.handle = NULL;
|
||||||
rpcMsg.msgType = pConn->inType;
|
rpcMsg.msgType = pConn->inType;
|
||||||
rpcMsg.code = TSDB_CODE_RPC_NETWORK_UNAVAIL;
|
rpcMsg.code = TSDB_CODE_RPC_NETWORK_UNAVAIL;
|
||||||
pConn->pReqMsg = NULL;
|
pConn->pReqMsg = NULL;
|
||||||
|
|
Loading…
Reference in New Issue