Unverified 提交 a5d5f926 authored 作者: NanoCode012's avatar NanoCode012 提交者: GitHub

Changed socket port and added timeout (#2176)

上级 c9bda112
......@@ -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
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论