Skip to content

[URL Session] Avoid Closing Sockets Before Cancelling Event Sources #2424

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

Merged
merged 1 commit into from
Jul 22, 2019

Conversation

gmittert
Copy link
Contributor

When you create an event source for a handle in dispatch, dispatch
assumes it owns it, however, when curl finishes with the socket, it
closes it, which leaves dispatch with an invalid handle.

This sets the curl close callback to do nothing which allows us to close
the socket after cancelling the dispatch sources.

When you create an event source for a handle in dispatch, dispatch
assumes it owns it, however, when curl finishes with the socket, it
closes it, which leaves dispatch with an invalid handle.

This sets the curl close callback to do nothing which allows us to close
the socket after cancelling the dispatch sources.
@gmittert gmittert requested review from weissi and pushkarnk July 20, 2019 00:51
@gmittert
Copy link
Contributor Author

@swift-ci please test linux

@compnerd
Copy link
Member

CC: @millenomi

@millenomi millenomi merged commit b834853 into swiftlang:master Jul 22, 2019
@gmittert gmittert deleted the DontStealTheSources branch July 22, 2019 17:00
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.

3 participants