windows: fix memory leak when non-zero tcp reads are used
This commit is contained in:
parent
ba52023ef3
commit
4e99cd4e29
@ -822,7 +822,8 @@ void uv_process_tcp_read_req(uv_loop_t* loop, uv_tcp_t* handle,
|
|||||||
|
|
||||||
if (!REQ_SUCCESS(req)) {
|
if (!REQ_SUCCESS(req)) {
|
||||||
/* An error occurred doing the read. */
|
/* An error occurred doing the read. */
|
||||||
if ((handle->flags & UV_HANDLE_READING)) {
|
if ((handle->flags & UV_HANDLE_READING) ||
|
||||||
|
!(handle->flags & UV_HANDLE_ZERO_READ)) {
|
||||||
handle->flags &= ~UV_HANDLE_READING;
|
handle->flags &= ~UV_HANDLE_READING;
|
||||||
buf = (handle->flags & UV_HANDLE_ZERO_READ) ?
|
buf = (handle->flags & UV_HANDLE_ZERO_READ) ?
|
||||||
uv_buf_init(NULL, 0) : handle->read_buffer;
|
uv_buf_init(NULL, 0) : handle->read_buffer;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user