lsalzman / enet

ENet reliable UDP networking library
MIT License
2.71k stars 669 forks source link

fix SRTT calculations when RTT < 8 ms and SRTT >= 8 ms #162

Open cgutman opened 3 years ago

cgutman commented 3 years ago

This fixes #161 by ensuring that the RTT division always rounds up.

cgutman commented 3 years ago

Because this change can cause RTT variance to reach 0 now, you may want to consider a change like https://github.com/cgutman/enet/commit/ad5bf95397adc6feb866e9bcef40dced17ec6489 to ensure sub-1ms RTT variance will not cause excessive retransmissions.