refactor transport
This commit is contained in:
parent
bd2e129686
commit
2a66965863
|
@ -2888,7 +2888,7 @@ int transSendRecv(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STransMs
|
||||||
|
|
||||||
SCliMsg* cliMsg = taosMemoryCalloc(1, sizeof(SCliMsg));
|
SCliMsg* cliMsg = taosMemoryCalloc(1, sizeof(SCliMsg));
|
||||||
if (cliMsg == NULL) {
|
if (cliMsg == NULL) {
|
||||||
sem_destroy(sem);
|
tsem_destroy(sem);
|
||||||
taosMemoryFree(sem);
|
taosMemoryFree(sem);
|
||||||
taosMemoryFree(pCtx);
|
taosMemoryFree(pCtx);
|
||||||
TAOS_CHECK_GOTO(TSDB_CODE_OUT_OF_MEMORY, NULL, _RETURN1);
|
TAOS_CHECK_GOTO(TSDB_CODE_OUT_OF_MEMORY, NULL, _RETURN1);
|
||||||
|
|
|
@ -1109,11 +1109,7 @@ static int32_t addHandleToWorkloop(SWorkThrd* pThrd, char* pipeName) {
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
#if defined(WINDOWS) || defined(DARWIN)
|
#if defined(WINDOWS) || defined(DARWIN)
|
||||||
code = uv_pipe_connect(&pThrd->connect_req, pThrd->pipe, pipeName, uvOnPipeConnectionCb);
|
uv_pipe_connect(&pThrd->connect_req, pThrd->pipe, pipeName, uvOnPipeConnectionCb);
|
||||||
if (code != 0) {
|
|
||||||
tError("failed to start connect pipe:%s", uv_err_name(code));
|
|
||||||
return TSDB_CODE_THIRDPARTY_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
code = uv_read_start((uv_stream_t*)pThrd->pipe, uvAllocConnBufferCb, uvOnConnectionCb);
|
code = uv_read_start((uv_stream_t*)pThrd->pipe, uvAllocConnBufferCb, uvOnConnectionCb);
|
||||||
|
|
Loading…
Reference in New Issue