-
Notifications
You must be signed in to change notification settings - Fork 147
Description
What is the default expected behavior in the presence of severe network errors? We're seeing a general behavior of SwiftPhoenixClient disconnecting and not re-connecting.
Interestingly, we see two separate behaviors. Our app connects to the same ws URL with two different Sockets, and then a single channel is created for each Socket, each with a different topic (one for "auction", one for "chat").
To reproduce the behavior, I ran the code on my iPhone and set the Network Link Conditioner to "Very Bad Network." But note that our users (and even some of our devs) are reporting apparent disconnects too frequently in the field.
I see a lot of heartbeat timeouts on the auction channel, but never on the chat channel. Eventually I’ll see timeouts on the transport, and then things just close:
transport, heartbeat timeout. Attempting to re-establish connection
transport, close
What can we do here to try to keep re-establishing the connection? Does adding an error or close callback give me a good place to re-connect?