From 81820c0013aed558aa6b0c56f7ba8decc605b585 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Fri, 23 Jul 2021 14:10:44 +1000 Subject: [PATCH] Remove unnecessary check --- SessionSnodeKit/OnionRequestAPI.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/SessionSnodeKit/OnionRequestAPI.swift b/SessionSnodeKit/OnionRequestAPI.swift index 771a6fb92..61e617c72 100644 --- a/SessionSnodeKit/OnionRequestAPI.swift +++ b/SessionSnodeKit/OnionRequestAPI.swift @@ -396,9 +396,7 @@ public enum OnionRequestAPI { let body = try JSONSerialization.jsonObject(with: bodyAsData, options: [ .fragmentsAllowed ]) as? JSON else { return seal.reject(HTTP.Error.invalidJSON) } if let timestamp = body["t"] as? Int64 { let offset = timestamp - Int64(NSDate.millisecondTimestamp()) - if abs(offset) > 20 * 1000 { // If we're off by more than 20 seconds - SnodeAPI.clockOffset = offset - } + SnodeAPI.clockOffset = offset } guard 200...299 ~= statusCode else { return seal.reject(Error.httpRequestFailedAtDestination(statusCode: UInt(statusCode), json: body, destination: destination))