mirror of
https://github.com//cppla/ServerStatus
synced 2025-06-03 06:09:50 +08:00
ipv6 for ipstatus
This commit is contained in:
parent
ddea313536
commit
da968a776d
@ -115,14 +115,12 @@ def tupd():
|
||||
def ip_status():
|
||||
ip_check = 0
|
||||
for i in [CU, CT, CM]:
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.settimeout(1)
|
||||
try:
|
||||
s.connect((i, PORBEPORT))
|
||||
s = socket.create_connection((i, PORBEPORT), timeout=1)
|
||||
s.close()
|
||||
del s
|
||||
except:
|
||||
ip_check += 1
|
||||
s.close()
|
||||
del s
|
||||
if ip_check >= 2:
|
||||
return False
|
||||
else:
|
||||
|
@ -99,14 +99,12 @@ def tupd():
|
||||
def ip_status():
|
||||
ip_check = 0
|
||||
for i in [CU, CT, CM]:
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.settimeout(1)
|
||||
try:
|
||||
s.connect((i, PORBEPORT))
|
||||
s = socket.create_connection((i, PORBEPORT), timeout=1)
|
||||
s.close()
|
||||
del s
|
||||
except:
|
||||
ip_check += 1
|
||||
s.close()
|
||||
del s
|
||||
if ip_check >= 2:
|
||||
return False
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user