Fix variable assignment for speedtest duration tracking
This commit is contained in:
parent
df05194b3b
commit
89dd1e030e
1 changed files with 2 additions and 2 deletions
|
@ -198,7 +198,7 @@ for ((COUNTER = 1; COUNTER <= NUM_TESTS; COUNTER++)); do
|
||||||
SECONDS=0
|
SECONDS=0
|
||||||
log "Speed test attempt $retry"
|
log "Speed test attempt $retry"
|
||||||
speed_results=$(speedtest --secure --csv 2>/dev/null || true)
|
speed_results=$(speedtest --secure --csv 2>/dev/null || true)
|
||||||
$speedtest_duration=$SECONDS
|
speedtest_duration=$SECONDS
|
||||||
[[ -n "$speed_results" ]] && break
|
[[ -n "$speed_results" ]] && break
|
||||||
warn "Speedtest failed. Retrying in $RETRY_DELAY seconds..."
|
warn "Speedtest failed. Retrying in $RETRY_DELAY seconds..."
|
||||||
echo "$(date -Iseconds),Speedtest failed on attempt $retry for test $COUNTER, sample $i" >> "$FAILURE_LOG"
|
echo "$(date -Iseconds),Speedtest failed on attempt $retry for test $COUNTER, sample $i" >> "$FAILURE_LOG"
|
||||||
|
@ -209,7 +209,7 @@ for ((COUNTER = 1; COUNTER <= NUM_TESTS; COUNTER++)); do
|
||||||
timestamp=$(date -Iseconds)
|
timestamp=$(date -Iseconds)
|
||||||
warn "Speedtest permanently failed. Skipping sample."
|
warn "Speedtest permanently failed. Skipping sample."
|
||||||
echo "$timestamp,Test $COUNTER,Sample $i" >>"$FAILURE_LOG"
|
echo "$timestamp,Test $COUNTER,Sample $i" >>"$FAILURE_LOG"
|
||||||
$speedtest_duration=$SECONDS
|
speedtest_duration=$SECONDS
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue