forked from platformio/platformio-core
Use BinTray when checking Internet connection // Resolve #968
This commit is contained in:
@@ -540,8 +540,8 @@ def get_api_result(url, params=None, data=None, auth=None, cache_valid=None):
|
|||||||
|
|
||||||
|
|
||||||
def internet_on(timeout=3):
|
def internet_on(timeout=3):
|
||||||
host = "8.8.8.8"
|
host = "dl.bintray.com"
|
||||||
port = 53
|
port = 443
|
||||||
try:
|
try:
|
||||||
socket.setdefaulttimeout(timeout)
|
socket.setdefaulttimeout(timeout)
|
||||||
socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect((host, port))
|
socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect((host, port))
|
||||||
|
Reference in New Issue
Block a user