refactor transport
This commit is contained in:
parent
2a66965863
commit
54476daaba
|
@ -872,7 +872,8 @@ static void cliAllocRecvBufferCb(uv_handle_t* handle, size_t suggested_size, uv_
|
||||||
SConnBuffer* pBuf = &conn->readBuf;
|
SConnBuffer* pBuf = &conn->readBuf;
|
||||||
int32_t code = transAllocBuffer(pBuf, buf);
|
int32_t code = transAllocBuffer(pBuf, buf);
|
||||||
if (code < 0) {
|
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) {
|
static void cliRecvCb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) {
|
||||||
|
|
|
@ -205,7 +205,7 @@ void uvAllocRecvBufferCb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* b
|
||||||
int32_t code = transAllocBuffer(pBuf, buf);
|
int32_t code = transAllocBuffer(pBuf, buf);
|
||||||
if (code < 0) {
|
if (code < 0) {
|
||||||
tError("conn %p failed to alloc buffer, since %s", conn, tstrerror(code));
|
tError("conn %p failed to alloc buffer, since %s", conn, tstrerror(code));
|
||||||
destroyConn(conn, true);
|
// destroyConn(conn, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue