mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-30 03:53:18 -04:00
Refactor
This commit is contained in:
@@ -32,10 +32,10 @@ def find_apps():
|
||||
|
||||
|
||||
def is_available(url):
|
||||
host, port = url.split("/")[2].split(":")
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.settimeout(1)
|
||||
try:
|
||||
host, port = url.split("/")[2].split(":")
|
||||
s.connect((host, int(port)))
|
||||
s.shutdown(socket.SHUT_RDWR)
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user