if (last2avg > thresh_fudged) {
if (latency > ping_prev[peername] && latency > ping_pprev[peername]) {
if (prefer_high_bw == 0) {
- bw_step_rx_next = 0
- bw_step_rx_cur = 0
+ _low_step = max(0, int((bw_step_rx_cur / 2) - 2))
+ bw_step_rx_next = _low_step
+ bw_step_rx_cur = _low_step
print "--- " ts " low-latency mode enforces step " bw_step_rx_next " := " STEPS_RX[bw_step_rx_next] "Kbps rx=" rx_rate " tx=" tx_rate
set_bw(IFACE_RX, STEPS_RX[bw_step_rx_next])
return
}
+function max (a, b) {
+ if (a > b) {
+ return a
+ }
+ return b
+}
+
+
END {
print "# " ts " BYE"
# Usually not reached.