Set TCP timeout to a more reasonable value

This commit is contained in:
computergeek125 2021-09-25 12:25:27 -05:00
parent 959b02f58f
commit 6fe8debeba

View File

@ -90,6 +90,7 @@ class Helpers:
try:
host_public = get('https://api.ipify.org').text
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(10.0)
result = sock.connect_ex((host_public ,server_port))
sock.close()
if result == 0: