Skip to content

Commit 82f0e77

Browse files
authored
feat: Update minimum OTP version to 24 (#156)
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.
1 parent 80206be commit 82f0e77

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
versions:
21-
- { otp: "21.3.8.24", rebar: "0be8717a4ff5b4a0c3dcef5031fe9833197d861e" } # rebar 3.15.2
21+
- { otp: "24.3.4.17", rebar: "e008a2ff40f708494a7c259a1fd8c2e77f7cd6a0" } # rebar 3.17.0
2222
- { otp: "25.3.2.19", rebar: "174fd9070195443d693d444ecd1f2b7aa91661fe" } # rebar 3.18.0
2323
- { otp: "27.3.2", rebar: "bde4b54248d16280b2c70a244aca3bb7566e2033" } # rebar 3.23.0
2424

rebar.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{erl_opts, [debug_info]}.
22
{deps, [
3-
{shotgun, "1.1.0"},
3+
{shotgun, "1.2.1"},
44
{jsx, "3.1.0"},
55
{verl, "1.0.1"},
66
{lru, "2.4.0"},

src/ldclient_update_stream_server.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ do_listen(Uri, FeatureStore, Tag, GunOpts, Headers) ->
181181
error_logger:warning_msg("Streaming connection ended"),
182182
shotgun:close(Pid)
183183
end,
184-
Options = #{async => true, async_mode => sse, handle_event => F},
184+
Options = #{async => true, async_mode => sse, handle_event => F, allow_reconnect => false},
185185
case shotgun:get(Pid, Path ++ Query, Headers, Options) of
186186
{error, Reason} ->
187187
shotgun:close(Pid),

0 commit comments

Comments
 (0)