enh: send rpc rsp on error of tmsgPutToQueue

This commit is contained in:
Benguang Zhao 2023-10-10 16:53:15 +08:00
parent e566027cef
commit a9ed36e167
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;
}