Repository navigation
fix: invalid fd during cleanup - #315
Merged
Merged
Conversation
utkarash2991
approved these changes
Oct 9, 2026
imor
force-pushed
the
rs/fix-cleanup-order
branch
2 times, most recently
from
October 11, 2026 11:26
bae1812 to
f013a25
Compare
imor
force-pushed
the
rs/fix-cleanup-order
branch
from
October 11, 2026 12:52
f013a25 to
e9ebd4a
Compare
imor
force-pushed
the
rs/fix-cleanup-order
branch
6 times, most recently
from
October 13, 2026 08:20
4d69c2f to
ce46588
Compare
Documentation for libcurl at https://curl.se/libcurl/c/CURLMOPT_SOCKETFUNCTION.html says the following about the multi socket callback function This callback may get invoked at any time when interacting with libcurl. This may even happen after all transfers are done and is likely to happen during a call to curl_multi_cleanup when cached connections are shut down. Since the callback uses epfd in it, it must stay open until curl_multi_cleanup succeeds. This commit reorders the cleanup functions to ensure that.
imor
force-pushed
the
rs/fix-cleanup-order
branch
from
October 22, 2026 08:36
ce46588 to
b662fbd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation for libcurl at says the following about the multi socket callback function:
Since the callback uses
epfdin it, it must stay open untilcurl_multi_cleanupsucceeds. This commit reorders the cleanup functions to ensure that.