Don't list failed entries within the connection log when earlier connections succeeded and we can assume where we wanted to connect to

master
WolverinDEV 2021-01-10 13:56:39 +01:00
parent 853c522129
commit af14cefbc7
1 changed files with 7 additions and 0 deletions

View File

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