F fix ping detection bug

pull/220/head
vapao 2020-10-13 18:05:22 +08:00
parent 3fb4d83209
commit dd57a2c879
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ def ping_check(addr):
if platform.system().lower() == 'windows':
command = f'ping -n 1 -w 3000 {addr}'
else:
command = f'ping -c 1 -t 3 {addr}'
command = f'ping -c 1 -W 3 {addr}'
task = subprocess.run(command, shell=True, stdout=subprocess.PIPE)
if task.returncode == 0:
return True, 'Ping检测正常'