Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/aslze/asl
Browse files Browse the repository at this point in the history
  • Loading branch information
aslze committed Oct 27, 2024
2 parents b8494a9 + a621c86 commit a1e59d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SerialPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ int SerialPort::read(void *p, int n)
DWORD bytes;
OVERLAPPED overlapped;
memset(&overlapped, 0, sizeof(OVERLAPPED));
if (!ReadFile(_handle, p, n, NULL, &overlapped))
if (!ReadFile(_handle, p, n, NULL, &overlapped) && GetLastError() != ERROR_IO_PENDING)
return 0;
GetOverlappedResult(_handle, &overlapped, &bytes, TRUE);
return bytes;
Expand Down

0 comments on commit a1e59d9

Please sign in to comment.