Merge pull request #23213 from taosdata/FIX/TD-26664-3.0

enh: send rpc rsp on error of tmsgPutToQueue
This commit is contained in:
Hongze Cheng 2023-10-10 22:46:24 -05:00 committed by GitHub
commit ef94767758
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -26,6 +26,10 @@ void tmsgSetDefault(const SMsgCb* msgcb) { defaultMsgCb = *msgcb; }
int32_t tmsgPutToQueue(const SMsgCb* msgcb, EQueueType qtype, SRpcMsg* pMsg) {
int32_t code = (*msgcb->putToQueueFp)(msgcb->mgmt, qtype, pMsg);
if (code != 0) {
SRpcMsg rsp = {.code = code, .info = pMsg->info};
if (rsp.info.handle != NULL) {
tmsgSendRsp(&rsp);
}
rpcFreeCont(pMsg->pCont);
pMsg->pCont = NULL;
}