Skip to content

Commit

Permalink
Changed socket port and added timeout (#2176)
Browse files Browse the repository at this point in the history
  • Loading branch information
NanoCode012 authored Feb 10, 2021
1 parent c9bda11 commit a5d5f92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a5d5f92

Please sign in to comment.