Prior to PR #197 when a gun_down was received that would result in the shotgun process exiting. An application using shotgun for SSE could monitor the PID and use the 'DOWN' event for error handling and re-connection.
Now shotgun transitions into a done state and the application is not aware that there is any issue.
References
Monitoring:
https://github.com/launchdarkly/erlang-server-sdk/blob/80206be388d7b8810b6e761f82c61774b77cfe29/src/ldclient_update_stream_server.erl#L170
Handling Down:
https://github.com/launchdarkly/erlang-server-sdk/blob/80206be388d7b8810b6e761f82c61774b77cfe29/src/ldclient_update_stream_server.erl#L92
One work-around is to poll the process periodically to see if it is still active:
https://github.com/knocklabs/erlang-server-sdk-2025-08/pull/1/files
But this isn't ideal.
Potentially we could have an option to disable this down state, so that the process will exit as it previously did.
Or some way of getting notified about the state transition?
Prior to PR #197 when a gun_down was received that would result in the shotgun process exiting. An application using shotgun for SSE could monitor the PID and use the 'DOWN' event for error handling and re-connection.
Now shotgun transitions into a
donestate and the application is not aware that there is any issue.References
Monitoring:
https://github.com/launchdarkly/erlang-server-sdk/blob/80206be388d7b8810b6e761f82c61774b77cfe29/src/ldclient_update_stream_server.erl#L170
Handling Down:
https://github.com/launchdarkly/erlang-server-sdk/blob/80206be388d7b8810b6e761f82c61774b77cfe29/src/ldclient_update_stream_server.erl#L92
One work-around is to poll the process periodically to see if it is still active:
https://github.com/knocklabs/erlang-server-sdk-2025-08/pull/1/files
But this isn't ideal.
Potentially we could have an option to disable this
downstate, so that the process will exit as it previously did.Or some way of getting notified about the state transition?