diff --git a/Session.xcodeproj/project.pbxproj b/Session.xcodeproj/project.pbxproj index 455cf72a1..f151af370 100644 --- a/Session.xcodeproj/project.pbxproj +++ b/Session.xcodeproj/project.pbxproj @@ -8042,7 +8042,7 @@ CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 451; + CURRENT_PROJECT_VERSION = 452; ENABLE_BITCODE = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -8120,7 +8120,7 @@ CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 451; + CURRENT_PROJECT_VERSION = 452; ENABLE_BITCODE = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; diff --git a/SessionMessagingKit/Jobs/Types/CheckForAppUpdatesJob.swift b/SessionMessagingKit/Jobs/Types/CheckForAppUpdatesJob.swift index da6f380ed..b5f96a2a0 100644 --- a/SessionMessagingKit/Jobs/Types/CheckForAppUpdatesJob.swift +++ b/SessionMessagingKit/Jobs/Types/CheckForAppUpdatesJob.swift @@ -6,6 +6,7 @@ import SessionUtilitiesKit import SessionSnodeKit public enum CheckForAppUpdatesJob: JobExecutor { + private static let updateCheckFrequency: TimeInterval = (4 * 60 * 60) // Max every 4 hours public static var maxFailureCount: Int = -1 public static var requiresThreadId: Bool = false public static let requiresInteractionId: Bool = false @@ -34,7 +35,7 @@ public enum CheckForAppUpdatesJob: JobExecutor { receiveCompletion: { _ in var updatedJob: Job = job.with( failureCount: 0, - nextRunTimestamp: (dependencies.dateNow.timeIntervalSince1970 + (24 * 60 * 60)) + nextRunTimestamp: (dependencies.dateNow.timeIntervalSince1970 + updateCheckFrequency) ) dependencies.storage.write(using: dependencies) { db in diff --git a/SessionSnodeKit/LibSession/LibSession+Networking.swift b/SessionSnodeKit/LibSession/LibSession+Networking.swift index f497246d9..0c6173c4a 100644 --- a/SessionSnodeKit/LibSession/LibSession+Networking.swift +++ b/SessionSnodeKit/LibSession/LibSession+Networking.swift @@ -204,7 +204,7 @@ public extension LibSession { switch result { case .failure(let error): throw error case .success(let nodes): - guard nodes.count > count else { throw SnodeAPIError.unableToRetrieveSwarm } + guard nodes.count >= count else { throw SnodeAPIError.unableToRetrieveSwarm } return nodes }