Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
win, tty: fix crash on restarting with pending data
When reading from tty is restarted while there is pending data, uv_tty_read_start calls uv_insert_pending_req instead of uv_tty_queue_read to avoid losing keypresses. But reading can be stopped and restarted multiple times before the req is handled, which caused an assertion error. Setting the UV_HANDLE_READ_PENDING flag prevents uv_insert_pending_req from being called again until the req is handled. Fixes: nodejs/node#9690 PR-URL: #1158 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Saúl Ibarra Corretgé <[email protected]>
- Loading branch information