From 666fb7ea2d7993bd47d3062dca3bb8dd1e1a87a5 Mon Sep 17 00:00:00 2001 From: Monica Moniot Date: Mon, 6 Feb 2023 14:50:05 -0500 Subject: [PATCH] eliminated duplicate paths (#1870) --- node/Peer.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/node/Peer.cpp b/node/Peer.cpp index c1dc124c6..62798e63c 100644 --- a/node/Peer.cpp +++ b/node/Peer.cpp @@ -543,7 +543,6 @@ unsigned int Peer::doPingAndKeepalive(void *tPtr,int64_t now) else break; } - unsigned int j = 0; for(unsigned int i=0;isent(now); sent |= (_paths[i].p->address().ss_family == AF_INET) ? 0x1 : 0x2; } - if (i != j) - _paths[j] = _paths[i]; - ++j; + } else { + _paths[i] = _PeerPath(); } } else break; }