diff --git a/Objective-C/CBLReplicator.mm b/Objective-C/CBLReplicator.mm index 82a8021f2..60ba8123a 100644 --- a/Objective-C/CBLReplicator.mm +++ b/Objective-C/CBLReplicator.mm @@ -104,6 +104,7 @@ - (instancetype) initWithConfig: (CBLReplicatorConfiguration *)config { _progressLevel = kCBLProgressLevelOverall; _changeNotifier = [CBLChangeNotifier new]; _docReplicationNotifier = [CBLChangeNotifier new]; + _pendingConflicts = [NSMutableArray array]; _status = [[CBLReplicatorStatus alloc] initWithStatus: {kC4Stopped, {}, {}}]; NSString* qName = self.description; @@ -670,7 +671,7 @@ - (void) logErrorOnDocument: (CBLReplicatedDocument*)doc pushing: (BOOL)pushing // Called inside the lock - (void) scheduleConflictResolutionForDocument: (CBLReplicatedDocument*)doc { - if (_conflictResolutionSuspended) { + if (_conflictResolutionSuspended || _state == kCBLStateStopped) { return; }