refactor transport

This commit is contained in:
Yihao Deng 2024-07-24 02:48:13 +00:00
parent 2a66965863
commit 54476daaba
2 changed files with 3 additions and 2 deletions

View File

@ -872,7 +872,8 @@ static void cliAllocRecvBufferCb(uv_handle_t* handle, size_t suggested_size, uv_
SConnBuffer* pBuf = &conn->readBuf;
int32_t code = transAllocBuffer(pBuf, buf);
if (code < 0) {
cliDestroyConn(conn, true);
tError("conn %p failed to alloc buffer, since %s", conn, tstrerror(code));
// cliDestroyConn(conn, true);
}
}
static void cliRecvCb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) {

View File

@ -205,7 +205,7 @@ void uvAllocRecvBufferCb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* b
int32_t code = transAllocBuffer(pBuf, buf);
if (code < 0) {
tError("conn %p failed to alloc buffer, since %s", conn, tstrerror(code));
destroyConn(conn, true);
// destroyConn(conn, true);
}
}