When calling pool.connect() there should be an event other than 'peerready' that is emitted, when all connections are filled (as 'ready' can happen before the peer is added to the _connectedPeers object in tests).
var pool = Pool();
pool.on('connected', function() {
// send message to peers
});
pool.connect();
I would call the event 'maxed' or 'full', given most use cases won't care about connecting to ALL peers in a list (thus 'connected' seems misguiding IMO)
When calling
pool.connect()
there should be an event other than 'peerready' that is emitted, when all connections are filled (as 'ready' can happen before the peer is added to the_connectedPeers
object in tests).