From 99e7ad0ce449cd905d277782f65404cf9afa641a Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sun, 10 Jan 2021 13:56:39 +0100 Subject: [PATCH] Don't list failed entries within the connection log when earlier connections succeeded and we can assume where we wanted to connect to --- shared/js/connectionlog/History.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/shared/js/connectionlog/History.ts b/shared/js/connectionlog/History.ts index 4ae48622..b2996dc9 100644 --- a/shared/js/connectionlog/History.ts +++ b/shared/js/connectionlog/History.ts @@ -387,6 +387,13 @@ export class ConnectionHistory { if(result.findIndex(entry => entry.serverUniqueId === parsedEntry.serverUniqueId) !== -1) { continue; } + + const failedEntry = result.find(entry => entry.targetAddress === parsedEntry.targetAddress); + if(failedEntry) { + /* We've a newer, but failed attempt to that address. Since we've connected to that address already we could just use that attempt */ + failedEntry.serverUniqueId = parsedEntry.serverUniqueId; + continue; + } } else { if(result.findIndex(entry => entry.targetAddress === parsedEntry.targetAddress) !== -1) { continue;