Skip to content

Commit

Permalink
dht_crawler: fix logging for missing ports
Browse files Browse the repository at this point in the history
  • Loading branch information
shyba committed Jul 25, 2022
1 parent abd7d37 commit cc6cdc0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/dht_crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,12 @@ async def probe_files(self):
if response:
self.working_streams_metric.labels("global").inc()
log.info("Found responsive peer for %s: %s:%d(%d)",
sd_hash.hex()[:8], blob_peer.address, blob_peer.udp_port, blob_peer.tcp_port)
sd_hash.hex()[:8], blob_peer.address,
blob_peer.udp_port or -1, blob_peer.tcp_port or -1)
else:
log.info("Found dead peer for %s: %s:%d(%d)",
sd_hash.hex()[:8], blob_peer.address, blob_peer.udp_port, blob_peer.tcp_port)
sd_hash.hex()[:8], blob_peer.address,
blob_peer.udp_port or -1, blob_peer.tcp_port or -1)
await asyncio.sleep(.5)

@property
Expand Down

0 comments on commit cc6cdc0

Please sign in to comment.