if t.addrActive(addr) {
return
}
- t.halfOpen[addr] = struct{}{}
+ t.halfOpen[addr] = peer
go cl.outgoingConnection(t, addr, peer.Source)
}
peers: make(map[peersKey]Peer),
conns: make(map[*connection]struct{}, 2*defaultEstablishedConnsPerTorrent),
- halfOpen: make(map[string]struct{}),
+ halfOpen: make(map[string]Peer),
pieceStateChanges: pubsub.NewPubSub(),
storageOpener: storageClient,
maxEstablishedConns int
// Set of addrs to which we're attempting to connect. Connections are
// half-open until all handshakes are completed.
- halfOpen map[string]struct{}
+ halfOpen map[string]Peer
// Reserve of peers to connect to. A peer can be both here and in the
// active connections if were told about the peer after connecting with