support refreshing connection config during reconnect#66
support refreshing connection config during reconnect#66joshk wants to merge 1 commit intoCuatroElixir:mainfrom
reconnect#66Conversation
|
I'm unsure about this. |
|
This PR was driven because of how If the server restarts or is briefly unavailable, using the retry back-off built into Slipstream and not having to replicate this logic ourselves is preferable, as this is primarily focused on mitigating against a thundering heard. This API would allow us to simplify our code and use a cleaner API (I'm biased of course) |
This adds a callback to update the connection config when
reconnectis called.Although there is an example on how to capture
403connection errors and fresh a uri token, this means you don't get to use thereconnect_after_mseclogic built intoreconnect.While there are ways to use
reconnectby updatingchannel_config, you run into an issue where the connection configuration is updated before theProcess.send_afterinreconnect, which can have a side effect of the connection configuration expiring if the reconnect delay is too long.