-
Notifications
You must be signed in to change notification settings - Fork 46
Add feature to allow disabling reconnection. #203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add feature to allow disabling reconnection. #203
Conversation
|
Not sure about this handling in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me, just a little nit-picking.
Any chance we can add some tests for this?
I will take a stab at it. |
|
@elbrujohalcon Addressed feedback and added tests. |
|
Thanks, @kinyoklion ! You've got a new release now: https://hex.pm/packages/shotgun/1.2.1 |
BEGIN_COMMIT_OVERRIDE feat: Update minimum OTP version to 24. fix: Fix issue where sometimes a dropped stream would not reconnect. END_COMMIT_OVERRIDE In shotgun 1.1.0 a new feature was introduced which introduced a bug with the SSE connection. Where previously it would close its process in all cases where it disconnected, now it would not do that in some situations. This caused #155. We contributed an update to shotgun to allow disabling the feature for async connections where you need to monitor the connection state. inaka/shotgun#203 This was released in shotgun 1.2.1. This PR updates to 1.2.1 and uses the option to disable the `reopen` feature added in shotgun 1.1.0. This PR also raises the minimum erlang version to 24. This is required to gun 2.2 which shotgun 1.2.0 and newer depends on. OTP doesn't have an official support timeline, but OTP 24 came out in 2021, so most people will likely be on 24 or greater especially when using elixir.
Add an option that allows for reconnects to be disabled when doing an async
getrequest. Currently I only added this option to the async path as I am unsure of how the reconnect feature is intended to be used.I've tried this approach with the LaunchDarkly SDK and it resolved the issue we were encountering with the reconnect feature #202.
Original issue: launchdarkly/erlang-server-sdk#155