Attempt to concurrently connect to remote IP addresses#11757
Merged
Gargron merged 2 commits intoSep 5, 2019
Conversation
3bc18e3 to
27114ab
Compare
ClearlyClaire
commented
Sep 4, 2019
Contributor
Author
There was a problem hiding this comment.
I am not super happy about having a socket as a hash key, but I'm not sure how else to make the sockaddr corresponding to the socket when doing the IO.select bit. Should be fine in practice.
058aca8 to
2cf1c45
Compare
2cf1c45 to
7b86633
Compare
Gargron
approved these changes
Sep 5, 2019
hiyuki2578
pushed a commit
to ProjectMyosotis/mastodon
that referenced
this pull request
Oct 2, 2019
* Attempt to concurrently connect to remote IP addresses * Reduce code length to please CodeClimate 🤷
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.

Currently, Mastodon tries to connect one IP at a time, which means it will waste time if the first IP address it tries is unreachable.
Furthermore, it should address the following scenario: