From fead92f2e3dee93fadf641262c2bd3ed7899ecf9 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Wed, 19 Jun 2019 13:11:55 +1000 Subject: [PATCH] Fix failure count maintenance bug --- SignalServiceKit/src/Loki/API/LokiAPI+SwarmAPI.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/SignalServiceKit/src/Loki/API/LokiAPI+SwarmAPI.swift b/SignalServiceKit/src/Loki/API/LokiAPI+SwarmAPI.swift index 4c2789a7b..dd60ed844 100644 --- a/SignalServiceKit/src/Loki/API/LokiAPI+SwarmAPI.swift +++ b/SignalServiceKit/src/Loki/API/LokiAPI+SwarmAPI.swift @@ -114,6 +114,7 @@ internal extension Promise { print("[Loki] Failure threshold reached for: \(target); dropping it.") LokiAPI.dropIfNeeded(target, hexEncodedPublicKey: hexEncodedPublicKey) // Remove it from the swarm cache associated with the given public key LokiAPI.randomSnodePool.remove(target) // Remove it from the random snode pool + LokiAPI.failureCount[target] = 0 } case 421: // The snode isn't associated with the given public key anymore