Skip to content

Commit

Permalink
Changed socket port and added timeout (ultralytics#2176)
Browse files Browse the repository at this point in the history
  • Loading branch information
NanoCode012 authored Feb 10, 2021
1 parent da80a1f commit 020e1b4
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 020e1b4

Please sign in to comment.