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

opt: close file descriptor after OnClose() #622

Merged
merged 1 commit into from
Jul 3, 2024
Merged

opt: close file descriptor after OnClose() #622

merged 1 commit into from
Jul 3, 2024

Conversation

panjf2000
Copy link
Owner

Fixes #621

@github-actions github-actions bot added the enhancement New feature or request label Jul 3, 2024
Copy link

codecov bot commented Jul 3, 2024

Codecov Report

Attention: Patch coverage is 28.57143% with 10 lines in your changes missing coverage. Please review.

Project coverage is 80.76%. Comparing base (8a80aaf) to head (b7aef26).

Files Patch % Lines
eventloop_unix.go 28.57% 9 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #622      +/-   ##
==========================================
- Coverage   80.89%   80.76%   -0.13%     
==========================================
  Files          21       21              
  Lines        2109     2116       +7     
==========================================
+ Hits         1706     1709       +3     
- Misses        273      276       +3     
- Partials      130      131       +1     
Flag Coverage Δ
unittests 80.76% <28.57%> (-0.13%) ⬇️

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

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

@panjf2000 panjf2000 added bug Something isn't working optimization Some small optimizations labels Jul 3, 2024
@panjf2000 panjf2000 merged commit 1ed4d08 into dev Jul 3, 2024
34 of 36 checks passed
@panjf2000 panjf2000 deleted the close-opt branch July 3, 2024 02:54
panjf2000 added a commit that referenced this pull request Jul 3, 2024
panjf2000 added a commit that referenced this pull request Jul 3, 2024
Updates #621

Follows up #622

This PR also refines `eventloop.close()` and fixes the potential UDP socket leaks for Windows clients.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request optimization Some small optimizations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug]: socket fd being reused during OnClose() lead to data corruption
1 participant