1
0
mirror of https://github.com/skywind3000/kcp.git synced 2025-04-24 04:10:34 +08:00

Merge pull request from xtaci/master

change clock granularity(G) to kcp->interval
This commit is contained in:
Linwei 2017-02-16 13:15:51 +08:00 committed by GitHub
commit 5fcf575218

2
ikcp.c
View File

@ -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);
}