Skip to content

Fix socket not reconnecting#300

Open
nduitz wants to merge 4 commits intocodedge-llc:mainfrom
9elements:fix/mint-reconnect
Open

Fix socket not reconnecting#300
nduitz wants to merge 4 commits intocodedge-llc:mainfrom
9elements:fix/mint-reconnect

Conversation

@nduitz
Copy link

@nduitz nduitz commented Oct 6, 2025

This handles error when the server closes connections.
The second commit implements a check for a open connection but it is not very resilient yet.
If the reconnect fails, the notification get's lost, either there needs to be some recovery mechanism or the response handler needs to be called.

#299

@nduitz nduitz force-pushed the fix/mint-reconnect branch 2 times, most recently from 172d3d8 to 3cb6cd8 Compare October 6, 2025 15:58
@nduitz nduitz changed the title handle more cases Fix socket not reconnecting Oct 6, 2025
@nduitz nduitz force-pushed the fix/mint-reconnect branch from 3cb6cd8 to b6b557a Compare October 7, 2025 07:43
@nduitz nduitz marked this pull request as draft October 7, 2025 19:17
@nduitz
Copy link
Author

nduitz commented Oct 7, 2025

Converted this to draft for now, I am still evaluating what else can be done so notifications won't get lost

@nduitz nduitz force-pushed the fix/mint-reconnect branch from 8a9a522 to f3f067b Compare March 10, 2026 15:11
@nduitz nduitz marked this pull request as ready for review March 10, 2026 15:12
@nduitz
Copy link
Author

nduitz commented Mar 10, 2026

This got way bigger then expected but I think this is pretty solid now.
Would be glad if this got reviewed :)

This now handles mint errors while trying to push/reconnect to the different services.
If the push does not work, instead of throwing it away it get's requeued as a retry.
The number of retries can be configured, they use exponential backoffs between each retry (maybe should be configuriable too?)

I extracted a bit of adapter logic that applies to both apns + fcm to a helper. the ADM adapter does not use very much of it because it has a different behaviour

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant