mirror of
https://github.com/skywind3000/kcp.git
synced 2024-12-26 23:20:10 +08:00
Merge pull request #61 from xtaci/master
change clock granularity(G) to kcp->interval
This commit is contained in:
commit
5fcf575218
2
ikcp.c
2
ikcp.c
@ -551,7 +551,7 @@ static void ikcp_update_ack(ikcpcb *kcp, IINT32 rtt)
|
||||
kcp->rx_srtt = (7 * kcp->rx_srtt + rtt) / 8;
|
||||
if (kcp->rx_srtt < 1) kcp->rx_srtt = 1;
|
||||
}
|
||||
rto = kcp->rx_srtt + _imax_(1, 4 * kcp->rx_rttval);
|
||||
rto = kcp->rx_srtt + _imax_(kcp->interval, 4 * kcp->rx_rttval);
|
||||
kcp->rx_rto = _ibound_(kcp->rx_minrto, rto, IKCP_RTO_MAX);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user