add the code to handle the broken link
This commit is contained in:
parent
e485bb24b2
commit
5e5f32b085
|
@ -799,6 +799,18 @@ static void rpcProcessBrokenLink(SRpcConn *pConn) {
|
||||||
pContext->code = TSDB_CODE_NETWORK_UNAVAIL;
|
pContext->code = TSDB_CODE_NETWORK_UNAVAIL;
|
||||||
taosTmrStart(rpcProcessConnError, 0, pContext, pRpc->tmrCtrl);
|
taosTmrStart(rpcProcessConnError, 0, pContext, pRpc->tmrCtrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pConn->inType) {
|
||||||
|
// if there are pending request, notify the app
|
||||||
|
tTrace("%s %p, connection is gone, notify the app", pRpc->label, pConn);
|
||||||
|
SRpcMsg rpcMsg;
|
||||||
|
rpcMsg.pCont = NULL;
|
||||||
|
rpcMsg.contLen = 0;
|
||||||
|
rpcMsg.handle = pConn;
|
||||||
|
rpcMsg.msgType = pConn->inType;
|
||||||
|
rpcMsg.code = TSDB_CODE_NETWORK_UNAVAIL;
|
||||||
|
(*(pRpc->cfp))(&rpcMsg);
|
||||||
|
}
|
||||||
|
|
||||||
rpcCloseConn(pConn);
|
rpcCloseConn(pConn);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue