未验证 提交 d997c2bb 编写于 作者: D dapan1121 提交者: GitHub

Merge pull request #21680 from taosdata/szhou/fix-ts3509

fix: taos crash since error code not set and taosd crash when first connect error timer frees rpm msg then retry timer
...@@ -1466,6 +1466,10 @@ static TBOOL rpcSendReqToServer(SRpcInfo *pRpc, SRpcReqContext *pContext) { ...@@ -1466,6 +1466,10 @@ static TBOOL rpcSendReqToServer(SRpcInfo *pRpc, SRpcReqContext *pContext) {
rpcUnlockConn(pConn); rpcUnlockConn(pConn);
if (ret == BOOL_FALSE) { if (ret == BOOL_FALSE) {
if (pConn->connType != RPC_CONN_TCPC) {
pContext->code = terrno;
return BOOL_ASYNC;
}
// try next ip again // try next ip again
pContext->code = terrno; pContext->code = terrno;
// in rpcProcessConnError if numOfTry over limit, could call rpcNotifyClient to stop query // in rpcProcessConnError if numOfTry over limit, could call rpcNotifyClient to stop query
...@@ -1499,6 +1503,7 @@ static bool rpcSendMsgToPeer(SRpcConn *pConn, void *msg, int msgLen) { ...@@ -1499,6 +1503,7 @@ static bool rpcSendMsgToPeer(SRpcConn *pConn, void *msg, int msgLen) {
if (writtenLen != msgLen) { if (writtenLen != msgLen) {
tError("%s, failed to send, msgLen:%d written:%d, reason:%s", pConn->info, msgLen, writtenLen, strerror(errno)); tError("%s, failed to send, msgLen:%d written:%d, reason:%s", pConn->info, msgLen, writtenLen, strerror(errno));
terrno = TAOS_SYSTEM_ERROR(errno);
ret = false; ret = false;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册