From bb755ae2a610da92e5cf3b9ff1ee5003abe2d718 Mon Sep 17 00:00:00 2001 From: NanoCode012 Date: Wed, 10 Feb 2021 16:09:24 +0700 Subject: [PATCH] Changed socket port and added timeout --- utils/general.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/general.py b/utils/general.py index bbc0f32b8425..f979a05c6e49 100755 --- a/utils/general.py +++ b/utils/general.py @@ -51,7 +51,7 @@ def check_online(): # Check internet connectivity import socket try: - socket.create_connection(("1.1.1.1", 53)) # check host accesability + socket.create_connection(("1.1.1.1", 443), 5) # check host accesability return True except OSError: return False