Changed socket port and added timeout (#2176)

This commit is contained in:
NanoCode012 authored and GitHub committed 2021-02-10 13:01:48 -08:00
1 parent c9bda112ae
commit a5d5f9262d
1 file changed
+1 -1
+1 -1
View File
@@ -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