瀏覽代碼

Adds iperf timeout for bandwith measurements.

master
Lukas Prause 3 年之前
父節點
當前提交
985cd1b499
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. +4
    -0
      measurement_main.py

+ 4
- 0
measurement_main.py 查看文件

is_measurement_done = False is_measurement_done = False
iperf_return = 0 iperf_return = 0
while not is_measurement_done or iperf_return != 0: while not is_measurement_done or iperf_return != 0:
if iperf_return != 0:
reconnect_modem()
try: try:
try: try:
iperf_return = subprocess.call(iperf_command, timeout=float(time) + TIMEOUT_OFFSET) iperf_return = subprocess.call(iperf_command, timeout=float(time) + TIMEOUT_OFFSET)
is_measurement_done = False is_measurement_done = False
iperf_return = 0 iperf_return = 0
while not is_measurement_done or iperf_return != 0: while not is_measurement_done or iperf_return != 0:
if iperf_return != 0:
reconnect_modem()
try: try:
try: try:
iperf_return = subprocess.call(iperf_command, timeout=float(time) + TIMEOUT_OFFSET) iperf_return = subprocess.call(iperf_command, timeout=float(time) + TIMEOUT_OFFSET)

Loading…
取消
儲存