Skip to content

Commit

Permalink
CBL-5035 : Fix not initializing pending conflict array (#3200)
Browse files Browse the repository at this point in the history
  • Loading branch information
pasin authored Nov 11, 2023
1 parent 9f194b8 commit 0f33a19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Objective-C/CBLReplicator.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 0f33a19

Please sign in to comment.