Implement Drop for ConnectedAdapter to clean up open sockets#44
Open
jslater89 wants to merge 2 commits intomwylde:masterfrom
Open
Implement Drop for ConnectedAdapter to clean up open sockets#44jslater89 wants to merge 2 commits intomwylde:masterfrom
jslater89 wants to merge 2 commits intomwylde:masterfrom
Conversation
Author
|
On reflection, this might need some further work to indicate that a clone of ConnectedAdapter (e.g. to be moved into a closure or a different thread) shouldn't necessarily close the underlying socket. |
Not a super-satisfying fix, but a fix.
Author
|
The second commit in this PR fixes the issue in my comment earlier, but not in a very satisfying way. I'm relatively new at Rust and happy to take suggestions. |
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.
This change stops rumble from leaking file descriptors when ConnectedAdapters go out of scope.