Skip to content

Conversation

LostKobrakai
Copy link
Collaborator

No description provided.

@LostKobrakai LostKobrakai requested a review from mdwaud October 26, 2022 17:03
def handle_info({:ssl_error, reason}, state) do
{:stop, {:error, reason}, state}
def handle_info({closed, _}, state) when closed in [:tcp_closed, :ssl_closed] do
if State.disconnecting?(state) do
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you want to think about this the other way: if the connection was closed when the connection state was :requesting_connection then we have a pretty good guess (though this is still a bit of a hack) that the server rejected the connection.

Copy link
Collaborator Author

@LostKobrakai LostKobrakai Mar 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that's a reasonable assumption to make. It could just as much be caused by a network or application issue while sink is in that state. Getting a negative connection response should be the reason for sink to consider itself being rejected. Any negative connection response will result in State.disconnecting?(state) being true.

I don't think penalizing a nova on bad network with a 5 minutes timeout would be a good idea and we should rather expect that connection responses are actually received if the nova is not already having a hard time keeping the connection open.

@LostKobrakai LostKobrakai force-pushed the chore/configurable-backoff branch from f1f59e1 to acf674f Compare March 30, 2023 17:03
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.

2 participants