From 651de37cf21a42c9df553ae36a5cd79ffccc5b24 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Tue, 12 Jan 2021 13:43:46 +1100 Subject: [PATCH] Remove incorrect debug assertion --- SessionMessagingKit/Jobs/JobQueue.swift | 7 ------- 1 file changed, 7 deletions(-) diff --git a/SessionMessagingKit/Jobs/JobQueue.swift b/SessionMessagingKit/Jobs/JobQueue.swift index 0e1285245..d6f5b8066 100644 --- a/SessionMessagingKit/Jobs/JobQueue.swift +++ b/SessionMessagingKit/Jobs/JobQueue.swift @@ -2,7 +2,6 @@ import SessionUtilitiesKit @objc(SNJobQueue) public final class JobQueue : NSObject, JobDelegate { - private var hasResumedPendingJobs = false // Just for debugging @objc public static let shared = JobQueue() @@ -21,12 +20,6 @@ public final class JobQueue : NSObject, JobDelegate { } @objc public func resumePendingJobs() { - if hasResumedPendingJobs { - #if DEBUG - preconditionFailure("resumePendingJobs() should only be called once.") - #endif - } - hasResumedPendingJobs = true let allJobTypes: [Job.Type] = [ AttachmentDownloadJob.self, AttachmentUploadJob.self, MessageReceiveJob.self, MessageSendJob.self, NotifyPNServerJob.self ] allJobTypes.forEach { type in let allPendingJobs = SNMessagingKitConfiguration.shared.storage.getAllPendingJobs(of: type)