I found that in some bad networks, iOS SDK cannot detect connection lost and cannot reconnect again even manually call "disconnect" then "connect".
Test with GSExample iOS Project:
0. I used an iPhone A as the hotspot and the other iPhone B as the UDT which connect to iPhone A via wifi,
So I can use the network link conditioner of iPhone A (Ref: https://www.natashatherobot.com/simulate-bad-network-ios-simulator/), to simulate bad network.
1. iPhone A set to normal network, iPhone B launch app, iPhone B press "connect" button, connected to server.
2. iPhone A set to 100% loss network, iPhone B press "disconnect", the SDK cannot disconnect.
3. iPhone B press "connect", still no response from SDK.
4. iPhone A set back to normal network, iPhone B no response. (At least I waited for 3 mins)
My real project encounters this case. If it ran into the case, I cannot send any request (always timeout) even the network is back to normal. The "keep alive" behaviour seems not to check anything.
Just to let you know this issue has been addressed, you can update the SDK here.
Thanks for quick response.
But the updated SDK only fixed few issues.
What I expected is that the SDK can detect the connection is lost ASAP, and automatically reconnect ASAP when network is back.
I tried the experiment again without manually press "disconnect" and "connect".
1. the SDK cannot detect the connection lost.
After I set network to 100% loss, the SDK took over 10 mins to inform the availability is gone.
2. The SDK took over 2 mins to auto reconnect after the network is back to normal.