Skip to content

Commit

Permalink
F fix ping detection bug
Browse files Browse the repository at this point in the history
  • Loading branch information
vapao committed Oct 13, 2020
1 parent 3fb4d83 commit dd57a2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spug_api/apps/monitor/executors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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检测正常'
Expand Down

0 comments on commit dd57a2c

Please sign in to comment.