commit
4cf41a8ea5
|
@ -140,7 +140,7 @@ static void clientHandleResp(SCliConn* conn) {
|
||||||
conn->push = NULL;
|
conn->push = NULL;
|
||||||
} else {
|
} else {
|
||||||
if (pCtx->pSem == NULL) {
|
if (pCtx->pSem == NULL) {
|
||||||
tTrace("client conn%p handle resp", conn);
|
tTrace("client conn %p handle resp", conn);
|
||||||
(pRpc->cfp)(pRpc->parent, &rpcMsg, NULL);
|
(pRpc->cfp)(pRpc->parent, &rpcMsg, NULL);
|
||||||
} else {
|
} else {
|
||||||
tTrace("client conn(sync) %p handle resp", conn);
|
tTrace("client conn(sync) %p handle resp", conn);
|
||||||
|
@ -178,11 +178,16 @@ static void clientHandleExcept(SCliConn* pConn) {
|
||||||
tTrace("client conn %p start to destroy", pConn);
|
tTrace("client conn %p start to destroy", pConn);
|
||||||
SCliMsg* pMsg = pConn->data;
|
SCliMsg* pMsg = pConn->data;
|
||||||
|
|
||||||
|
tmsg_t msgType = TDMT_MND_CONNECT;
|
||||||
|
if (pMsg != NULL) {
|
||||||
|
msgType = pMsg->msg.msgType;
|
||||||
|
}
|
||||||
STransConnCtx* pCtx = pMsg->ctx;
|
STransConnCtx* pCtx = pMsg->ctx;
|
||||||
|
|
||||||
SRpcMsg rpcMsg = {0};
|
SRpcMsg rpcMsg = {0};
|
||||||
rpcMsg.ahandle = pCtx->ahandle;
|
rpcMsg.ahandle = pCtx->ahandle;
|
||||||
rpcMsg.code = TSDB_CODE_RPC_NETWORK_UNAVAIL;
|
rpcMsg.code = TSDB_CODE_RPC_NETWORK_UNAVAIL;
|
||||||
|
rpcMsg.msgType = msgType + 1;
|
||||||
|
|
||||||
if (pConn->push != NULL && pConn->notifyCount != 0) {
|
if (pConn->push != NULL && pConn->notifyCount != 0) {
|
||||||
(*pConn->push->callback)(pConn->push->arg, &rpcMsg);
|
(*pConn->push->callback)(pConn->push->arg, &rpcMsg);
|
||||||
|
@ -712,7 +717,6 @@ void rpcSendRecv(void* shandle, SEpSet* pEpSet, SRpcMsg* pReq, SRpcMsg* pRsp) {
|
||||||
// pthread_mutex_lock(&thrd->msgMtx);
|
// pthread_mutex_lock(&thrd->msgMtx);
|
||||||
// QUEUE_PUSH(&thrd->msg, &cliMsg->q);
|
// QUEUE_PUSH(&thrd->msg, &cliMsg->q);
|
||||||
// pthread_mutex_unlock(&thrd->msgMtx);
|
// pthread_mutex_unlock(&thrd->msgMtx);
|
||||||
|
|
||||||
// int start = taosGetTimestampUs();
|
// int start = taosGetTimestampUs();
|
||||||
transSendAsync(thrd->asyncPool, &(cliMsg->q));
|
transSendAsync(thrd->asyncPool, &(cliMsg->q));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue