Remove unnecessary check

This commit is contained in:
Niels Andriesse 2021-07-23 14:10:44 +10:00
parent ab42433a96
commit 81820c0013
1 changed files with 1 additions and 3 deletions

View File

@ -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))