Sometimes, when starting a peer, some or all of its handlers attempt a connection to the same peer. I suspect that this happens because when we call save_known_peer in connection_handler.ex, we're not saving unique peers, we're saving all peers. Here's a screenshot of what happens:
This should be a relatively simple fix: just change the function in store/peer.ex to ensure only unique items are saved.
Sometimes, when starting a peer, some or all of its handlers attempt a connection to the same peer. I suspect that this happens because when we call
save_known_peer
in connection_handler.ex, we're not saving unique peers, we're saving all peers. Here's a screenshot of what happens:This should be a relatively simple fix: just change the function in store/peer.ex to ensure only unique items are saved.