win/tty: fix case where uv_read_start incorrectly reports failure
In very rare circumstances a uv_read_start() call on a uv_tty_t handle in raw mode would return -1 but there was no actual failure. This patch fixes that.
This commit is contained in:
parent
aebc0f2242
commit
b77139964b
@ -758,7 +758,7 @@ int uv_tty_read_start(uv_tty_t* handle, uv_alloc_cb alloc_cb,
|
||||
if (handle->last_key_len > 0) {
|
||||
SET_REQ_SUCCESS(&handle->read_req);
|
||||
uv_insert_pending_req(handle->loop, (uv_req_t*) &handle->read_req);
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
uv_tty_queue_read(loop, handle);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user