diff --git a/omr-tracker/files/bin/omr-tracker b/omr-tracker/files/bin/omr-tracker index 12a10d54fa..8dacbc24bc 100755 --- a/omr-tracker/files/bin/omr-tracker +++ b/omr-tracker/files/bin/omr-tracker @@ -176,9 +176,12 @@ _ping() { loss=$(echo "$ret" | grep 'packet loss' | sed -ne 's/.*\([0-9]\+\)% packet loss.*/\1/p') if [ -n "$loss" ] && [ "$loss" -ne 100 ]; then if [ "$localip" = "yes" ]; then - OMR_TRACKER_LATENCY=$(echo "$ret" | cut -d "/" -s -f5 | cut -d "." -f1 | tr -d '\n') + latency=$(echo "$ret" | cut -d "/" -s -f5 | cut -d "." -f1 | tr -d '\n') + [ -n "$latency" ] && { + OMR_TRACKER_LATENCY="$latency" + _update_rto "$OMR_TRACKER_LATENCY" + } OMR_TRACKER_LOSS="$loss" - _update_rto "$OMR_TRACKER_LATENCY" fi return fi