quinn
quinn copied to clipboard
setting idle_timeout to very large numbers yields in immediate timeout
When I'm setting idle_timeout to numbers like 1<<62 - 1 or 1 << 61, I'm getting an idle timeout right after connecting. "small" values like 2000 work great.
In debug mode, instead of an idle timeout right away you are getting an "attempt to multiply with overflow". This is what I'm getting for various values in debug mode:
1 << 20works1 << 26works1 << 27 - 1works1 << 27doesn't work "timer shutdown"1 << 40doesn't work "timer shutdown"1 << 50doesn't work "attempt to multiply with overflow"1 << 60doesn't work "attempt to multiply with overflow"1 << 63doesn't work "value too large"
#212 should address the overflow; the other cases look like tokio behaving weird, which will need to be investigated separately, although I'm not sure there's a genuine usecase for setting your idle timeout longer than 4 years once #212 also fixes disabling the timeout outright.
#213 addressed the "value too large" panic by sanity-checking during varint construction, as well.
So should we close this now?
I haven't investigated the "timer shutdown" issue yet; I suspect it's an issue with tokio
So should we close this now?
Ideally, I'd like any unexpected limits to be documented before closing.