Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed PURGE_RXABORT flag on flush for Windows #1817

Merged
merged 1 commit into from
May 2, 2019
Merged

Removed PURGE_RXABORT flag on flush for Windows #1817

merged 1 commit into from
May 2, 2019

Conversation

krutkay
Copy link
Contributor

@krutkay krutkay commented Mar 14, 2019

The PURGE_RXABORT flag causes the ReadFileEx to be cancelled, which somehow causes the port to become disconnected (didn't dive that deep into the intricacies of the issue).

After creating this fix, we found issue #1013, which suggests the same resolution; after reviewing PR #1223, I'm not sure that #1013 was ever resolved correctly.

This resolves #1409.

The PURGE_RXABORT flag causes the ReadFileEx to be cancelled; on
cancellation, the ReadIOCompletion method is called with a non-zero
errorCode.
@codecov
Copy link

codecov bot commented Mar 14, 2019

Codecov Report

Merging #1817 into master will increase coverage by 1.94%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1817      +/-   ##
==========================================
+ Coverage   64.84%   66.78%   +1.94%     
==========================================
  Files          23       22       -1     
  Lines         876      834      -42     
==========================================
- Hits          568      557      -11     
+ Misses        308      277      -31
Impacted Files Coverage Δ
packages/bindings/lib/index.js 70% <0%> (-30%) ⬇️
packages/bindings/lib/darwin.js

@maxwellhadley
Copy link

I hope this can merged soon, so I can resolve https://github.com/rfxcom/node-rfxcom/issues/81

@maxwellhadley
Copy link

Bump

@reconbot
Copy link
Member

reconbot commented May 2, 2019

I'm curious what this does to the read in progress, however whatever that is is better than erroring out the port.

@reconbot reconbot merged commit 1daa919 into serialport:master May 2, 2019
@krutkay krutkay deleted the issue/1409 branch May 2, 2019 12:57
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

ReadIOCompletion error closes port after flush on Windows
3 participants