-
Notifications
You must be signed in to change notification settings - Fork 301
Description
In the 3.2.4 SDK, when an Internet connection is lost, Replicator seems to use a back-off strategy to attempt to reconnect. The trouble with this approach is that once an Internet connection is restored, it's often a long while until the replicator is back online.
A Better Alternative:
Use https://github.com/ashleymills/Reachability.swift. The SDK can be immediately notified when Internet is available again and then reconnect the replicator instantly. It doesn't have to poll.
This also lets the SDK differentiate between "connection lost because the device has no Internet" and "connection lost because something sever-side has failed," which is a great advantage. In the former case (which is FAR more likely), polling is not needed and the replicator can simply wait until it's told that the device has Internet again. In the latter case, you can still use the back-off strategy to attempt reconnections.
This would be a great improvement/modernization for the SDK.