erlang-libp2p icon indicating copy to clipboard operation
erlang-libp2p copied to clipboard

clear target in the group server when worker fails to connect to peer and reverts back to targeting

Open andymck opened this issue 4 years ago • 0 comments

Related PR ( both issues affect same flow ): https://github.com/helium/erlang-libp2p/pull/281

When a group worker is trying to connect to a remote peer/target and it fails to do so it will end up reverting back to targeting if the max connect retry threshold is breached.

At this point targeting will request a new target from the group sever. However the previously assigned target peer will never be reassigned as the group server has not been told the original assign_target failed and as far as its concerned the target is assigned to a worker ( the group server saves a target as assigned to a worker as part of its assign_target call and does so before the group worker receives the target, there is no handshake to indicate assigned and received/connected).

When this happens the previously assigned peer will never be reassigned to a new group worker.

andymck avatar May 18 '20 15:05 andymck