Skip to content

Commit

Permalink
Removed deletion of file if queue is empty because req are added only…
Browse files Browse the repository at this point in the history
… on cold launch.
  • Loading branch information
NidhiDixit09 committed Sep 24, 2024
1 parent dc8d033 commit 0ccfb96
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Sources/BranchSDK/BNCServerRequestQueue.m
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,6 @@ - (void)cancelTimer {
- (void)persistImmediately {
@synchronized (self) {
if (!self.queue || self.queue.count == 0) {
//No more requests. Delete cached queue file.
[self removeSaveFile];
return;
}
NSArray *queueCopy = [self.queue copy];
Expand Down Expand Up @@ -298,7 +296,7 @@ - (void)retrieve {
// It's been reported that unarchive can fail in some situations. In that case, remove the queued requests file.
- (void)removeSaveFile {
NSURL *fileURL = [BNCServerRequestQueue URLForQueueFile];
if (fileURL && [NSFileManager.defaultManager fileExistsAtPath:[fileURL path]]) {
if (fileURL) {
NSError *error;
[NSFileManager.defaultManager removeItemAtURL:fileURL error:&error];

Expand Down

0 comments on commit 0ccfb96

Please sign in to comment.