Closed fnaranjo-vmw closed 4 years ago
This makes a lot of sense.
Hi @okdistribute Will try to add some tests today :)
Hello @okdistribute Added a test that should suffice to compare the behavior before and after this patch. Regards!
cc @mafintosh is there anything blocking this from being merged and released?
published in 6.0.1
I think this patch fixes flaky reconnect #6
The problem prevented reconnecting to a peer after it was dropped for some reason. Unless the sync process was killed and restarted.
The root of the problem was that an "already seen" peer was always discarded as "duplicate" without considering that such peer may have been dropped at some point in the past.
These fix adds an extra check that only discards a peer as "duplicate" if and only if it is "already seen" AND ALSO is "currently connected".