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

Alternative fix for #58 (double close bug) #60

Closed
wants to merge 7 commits into from
Closed

Conversation

ionelmc
Copy link
Owner

@ionelmc ionelmc commented Mar 18, 2021

Ref #58.

if hasattr(client, 'detach'):
client_fd = client.detach()
else:
client_fd = _ORIGINAL_DUP(client.fileno())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When that may happen?

Should it use fileno at all in this case when it leads to known bugs?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what the dup is for, there would be two numbers for the have underlying resource. So there won't be a double close since there would be two different numbers.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, true, didn't noticed that. Thanks

@codecov
Copy link

codecov bot commented Mar 18, 2021

Codecov Report

Merging #60 (c7142b1) into master (16596e7) will increase coverage by 0.96%.
The diff coverage is 77.27%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #60      +/-   ##
==========================================
+ Coverage   81.91%   82.87%   +0.96%     
==========================================
  Files           6        6              
  Lines        1261     1285      +24     
  Branches      135      140       +5     
==========================================
+ Hits         1033     1065      +32     
+ Misses        187      181       -6     
+ Partials       41       39       -2     
Impacted Files Coverage Δ
tests/wsgi.py 38.46% <0.00%> (-38.47%) ⬇️
tests/test_manhole.py 91.23% <50.00%> (+0.25%) ⬆️
src/manhole/__init__.py 90.48% <100.00%> (+2.17%) ⬆️
tests/test_manhole_cli.py 100.00% <100.00%> (+2.56%) ⬆️
src/manhole/cli.py 36.13% <0.00%> (+1.68%) ⬆️
tests/helper.py 77.39% <0.00%> (+3.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 16596e7...c7142b1. Read the comment docs.

@ionelmc ionelmc closed this Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants