lynxthecat / cake-autorate

Eliminate the excess latency and jitter terrorizing your 4G, 5G, LTE, Starlink or other variable rate connection!
https://www.bufferbloat.net
GNU General Public License v2.0
263 stars 24 forks source link

fix: Delay startup before assigning initial timestamps #257

Closed joshuawn closed 10 months ago

joshuawn commented 10 months ago

When startup_wait_s is non-zero, anything dependent upon initial timestamps (e.g., the reflector timeout period) will be affected by the sleep. If the reflector timeout period is less than the startup_wait_s duration. this causes a fatal crash immediately after the startup sleep ends. This is addressed by sleeping before assigning any initial timestamps.

lynxthecat commented 10 months ago

@joshuawn many thanks indeed for submitting this pull request. I was able to recreate the issue and your proposed fix resolved it. And otherwise I agree with where you have relocated the startup delay code.