remove unused bypass_dns parameter

This commit is contained in:
Jack Robison 2017-10-31 12:18:47 -04:00
parent 3fd542f702
commit f7aa478b9b
No known key found for this signature in database
GPG key ID: 284699E7404E3CFF

View file

@ -94,12 +94,11 @@ def obfuscate(plain):
return base64.b64encode(plain).encode('rot13')
def check_connection(server="lbry.io", port=80, timeout=2, bypass_dns=False):
def check_connection(server="lbry.io", port=80, timeout=2):
"""Attempts to open a socket to server:port and returns True if successful."""
log.debug('Checking connection to %s:%s', server, port)
try:
if not bypass_dns:
server = socket.gethostbyname(server)
server = socket.gethostbyname(server)
socket.create_connection((server, port), timeout)
log.debug('Connection successful')
return True