Rev450, PEX quickfix
This commit is contained in:
parent
4b403da056
commit
3173313ca2
2 changed files with 4 additions and 4 deletions
|
@ -8,7 +8,7 @@ class Config(object):
|
|||
|
||||
def __init__(self, argv):
|
||||
self.version = "0.3.2"
|
||||
self.rev = 448
|
||||
self.rev = 450
|
||||
self.argv = argv
|
||||
self.action = None
|
||||
self.createParser()
|
||||
|
|
|
@ -220,13 +220,13 @@ class FileRequest(object):
|
|||
added += 1
|
||||
connected_peer.connect(self.connection) # Assign current connection to peer
|
||||
|
||||
for addr_packed in params["peers"]: # Add sent peers to site
|
||||
address = helper.unpackAddress(addr_packed)
|
||||
for packed_address in params["peers"]: # Add sent peers to site
|
||||
address = helper.unpackAddress(packed_address)
|
||||
got_peer_keys.append("%s:%s" % address)
|
||||
if site.addPeer(*address):
|
||||
added += 1
|
||||
# Send back peers that is not in the sent list and connectable (not port 0)
|
||||
packed_peers = [peer.packAddress() for peer in site.getConnectablePeers(params["need"], got_peer_keys)]
|
||||
packed_peers = [peer.packMyAddress() for peer in site.getConnectablePeers(params["need"], got_peer_keys)]
|
||||
if added:
|
||||
site.worker_manager.onPeers()
|
||||
self.log.debug("Added %s peers to %s using pex, sending back %s" % (added, site, len(packed_peers)))
|
||||
|
|
Loading…
Reference in a new issue