提交 f3f0e39a 编写于 作者: 陶建辉(Jeff)'s avatar 陶建辉(Jeff)

deadlock

上级 387f162d
......@@ -489,20 +489,22 @@ void rpcSendRecv(void *shandle, SRpcIpSet *pIpSet, const SRpcMsg *pMsg, SRpcMsg
// this API is used by server app to keep an APP context in case connection is broken
int rpcReportProgress(void *handle, char *pCont, int contLen) {
SRpcConn *pConn = (SRpcConn *)handle;
int code = 0;
rpcLockConn(pConn);
if (pConn->user[0]) {
// pReqMsg and reqMsgLen is re-used to store the context from app server
pConn->pReqMsg = pCont;
pConn->reqMsgLen = contLen;
return 0;
}
} else {
tTrace("%s, rpc connection is already released", pConn->info);
rpcFreeCont(pCont);
code = -1;
}
tTrace("%s, rpc connection is already released", pConn->info);
rpcFreeCont(pCont);
rpcUnlockConn(pConn);
return -1;
return code;
}
/* todo: cancel process may have race condition, pContext may have been released
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册