From a1b2ff772a246a0367e1bb4439c6eb2827e960ab Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Thu, 23 Jul 2020 00:15:38 -0700 Subject: [PATCH] Add new replacement condition in peer path redundancy logic to fix duplicate paths --- node/Peer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/node/Peer.cpp b/node/Peer.cpp index f99396aaa..ad3d47106 100644 --- a/node/Peer.cpp +++ b/node/Peer.cpp @@ -139,6 +139,9 @@ void Peer::received( if (q > replacePathQuality) { replacePathQuality = q; replacePath = i; + if (!_paths[i].p->alive(now)) { + break; // Stop searching, we found an identical dead path, replace the object + } } } else { replacePath = i;