conn: Return non-zero delay when in CONNECTING state #1908
Closed
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.
If connection is in state CONNECTING and there is data ready to be sent
using value 0 for the delay results in busy loop because Sender calls
select with the value returned from here and then just keeps on calling
it again and again until connection completes or fails. In some cases
this can take a long time and if the connection failed it will just be
retried and the busy loop continues.
This return value was changed from 999999999 to 0 in commit 16c13f9 and
it doesn't look like it needs to be exactly zero for other logic to work
correctly.
Fixes #1907
This change is