TomT
Convex Communityโ€ข4mo agoโ€ข
1 reply
Tom

[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?
Was this page helpful?