[Convex-Swift] No way to detect silent disconnections / connection state #5
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.How do you currently deal with that in your apps?
