mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-26 02:47:17 +00:00
Cancel timed out read operation to fix random crashes in Node's IoCompletionPort handler
This commit is contained in:
parent
81b66edfc6
commit
bb1292a1ed
1 changed files with 1 additions and 0 deletions
|
|
@ -140,6 +140,7 @@ void EIO_WatchPort(uv_work_t* req) {
|
|||
|
||||
DWORD waitResult = WaitForSingleObject(ov.hEvent, 1000);
|
||||
if(waitResult == WAIT_TIMEOUT) {
|
||||
CancelIo(data->fd);
|
||||
data->bytesRead = 0;
|
||||
data->errorCode = 0;
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue