[Convex-Swift] No way to detect silent disconnections / connection state #5
Hi team 👋
I’m running Convex in production with the Swift SDK, and I’m hitting a recurring problem:
* The app will sometimes silently drop the Convex connection (likely the WebSocket getting wedged or a transport error).
* After that, all queries/mutations/subscriptions stop working, but my
SubscriptionStore has no idea that the client is disconnected.
* There’s currently no public API in Swift to check connection state or to observe state changes.
In other SDKs there is such an API:
* JS: client.subscribeToConnectionState(cb)
* Rust: with_on_state_change(...)
But in Swift, we only have subscribe, mutation, action, and authState. That means I cannot build health checks or automatically reset the client when the socket goes down.
👉 Request:
How do you currently deal with that in your apps?1 Reply
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!