Using iOS Objective-C CBL v2.8.4 – App opens a local CBLDatabase, then starts it replicating. Replication then idles, having sync’d all documents. At this point, the network goes down and the app attempts to stop the replication by calling CBLReplicator’s -stop method and removing the listener token it had acquired earlier. Instead of stopping cleanly, the replication appears to stop (cf. CBL logs) but doesn’t end up calling -stopped method. It then continues with retries until it runs out of attempts (i.e. basically forever). App then calls CBLDatabase -close: method, this method hangs by spinning forever on _closeCondition because activeStoppables is never emptied out because the CBLReplicator’s -stopped method is never called.
Is there a way to short circuit this behaviour and force the replication to stop?
We have fixed the replicator not getting stop when a transient error happens during the stop in 3.0.0. I understand that this the issue you are encountering is likely to be the same (e.g. the replicator keeps retrying after stop). Could you update to use the latest version (3.0.1) and see if the issue is resolved?