Add configurable backoff#11
Conversation
| 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
f1f59e1 to
acf674f
Compare
No description provided.