From ed2b8d01fb68ca1bc984754b87b52a1a2888fed8 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Thu, 8 Oct 2020 16:46:56 +1100 Subject: [PATCH] Clean --- .../src/Loki/API/Onion Requests/OnionRequestAPI.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SignalServiceKit/src/Loki/API/Onion Requests/OnionRequestAPI.swift b/SignalServiceKit/src/Loki/API/Onion Requests/OnionRequestAPI.swift index e7cc58577..b1c461378 100644 --- a/SignalServiceKit/src/Loki/API/Onion Requests/OnionRequestAPI.swift +++ b/SignalServiceKit/src/Loki/API/Onion Requests/OnionRequestAPI.swift @@ -174,7 +174,7 @@ public enum OnionRequestAPI { } private static func drop(_ snode: Snode) throws { - var oldPaths = OnionRequestAPI.paths + var oldPaths = paths guard let pathIndex = oldPaths.firstIndex(where: { $0.contains(snode) }) else { return } var path = oldPaths.remove(at: pathIndex) guard let snodeIndex = path.firstIndex(of: snode) else { return } @@ -185,7 +185,7 @@ public enum OnionRequestAPI { path.append(unusedSnodes.randomElement()!) // Don't test the new snode as this would reveal the user's IP let newPaths = oldPaths + [ path ] - OnionRequestAPI.paths = newPaths + paths = newPaths try! Storage.writeSync { transaction in print("[Loki] Persisting onion request paths to database.") OWSPrimaryStorage.shared().setOnionRequestPaths(newPaths, in: transaction)