forked from LBRYCommunity/lbry-sdk
tracker:log DNS errors as warning instead of trace
This commit is contained in:
parent
7e6ea97499
commit
a7cea4082e
1 changed files with 6 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
import random
|
||||
import socket
|
||||
import string
|
||||
import struct
|
||||
import asyncio
|
||||
|
@ -195,7 +196,11 @@ class TrackerClient:
|
|||
async def _probe_server(self, info_hash, tracker_host, tracker_port, stopped=False):
|
||||
result = None
|
||||
self.results.setdefault(tracker_host, {})
|
||||
try:
|
||||
tracker_host = await resolve_host(tracker_host, tracker_port, 'udp')
|
||||
except socket.error:
|
||||
log.warning("DNS failure while resolving tracker host: %s, skipping.", tracker_host)
|
||||
return
|
||||
if info_hash in self.results[tracker_host]:
|
||||
next_announcement, result = self.results[tracker_host][info_hash]
|
||||
if time.time() < next_announcement:
|
||||
|
|
Loading…
Reference in a new issue