mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix OMR-Tracker when latency is empty?
This commit is contained in:
parent
d9b345e746
commit
37498c1725
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue