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

bugfix: serial enumerator failures in some rare circumstances #830

Merged
merged 8 commits into from
Sep 14, 2023

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Sep 13, 2023

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • Tests for the changes have been added (for bug fixes / features)

What kind of change does this PR introduce?

What is the current behavior?

If an en enumerator starts failing the current port list is retained. This leads to strange behaviors like #808.

What is the new behavior?

The new behavior is to clean up the port list if the enumerator fails to enumerate the ports.

Does this PR introduce a breaking change?

No

Other information:

This PR contains two fixes:

@cmaglie cmaglie self-assigned this Sep 13, 2023
@codecov-commenter
Copy link

codecov-commenter commented Sep 13, 2023

Codecov Report

Patch coverage: 4.34% and project coverage change: +5.70% 🎉

Comparison is base (b1ece84) 11.14% compared to head (faf57f6) 16.85%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #830      +/-   ##
==========================================
+ Coverage   11.14%   16.85%   +5.70%     
==========================================
  Files          53       53              
  Lines        4073     4082       +9     
==========================================
+ Hits          454      688     +234     
+ Misses       3563     3294     -269     
- Partials       56      100      +44     
Flag Coverage Δ
unit 16.85% <4.34%> (+5.70%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
discovery.go 0.00% <0.00%> (ø)
main.go 2.29% <0.00%> (+<0.01%) ⬆️
serial.go 0.00% <0.00%> (ø)
seriallist.go 0.00% <0.00%> (ø)
serialport.go 0.00% <0.00%> (ø)
v2/http.go 87.50% <100.00%> (+87.50%) ⬆️

... and 10 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cmaglie cmaglie added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Sep 13, 2023
@cmaglie cmaglie linked an issue Sep 14, 2023 that may be closed by this pull request
3 tasks
@cmaglie cmaglie changed the title workaround: if the serial enumerator fails, the port list is emptied bugfix: if the serial enumerator fails, the port list is emptied Sep 14, 2023
@cmaglie cmaglie changed the title bugfix: if the serial enumerator fails, the port list is emptied bugfix: serial enumerator failures in some rare circumstances Sep 14, 2023
serial.go Outdated Show resolved Hide resolved
Co-authored-by: Umberto Baldi <34278123+umbynos@users.noreply.github.com>
@cmaglie cmaglie merged commit 716e7aa into main Sep 14, 2023
42 checks passed
@cmaglie cmaglie deleted the discovery_bug_fix branch September 14, 2023 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port is persistently discovered after disconnect
3 participants