Skip to content

QUIC: handling of timeouts should be improved  #55984

Closed
@wfurt

Description

@wfurt

Currently we set timeout in SafeMsQuicConfigurationHandle

if (options.IdleTimeout != Timeout.InfiniteTimeSpan)
{
if (options.IdleTimeout <= TimeSpan.Zero) throw new Exception("IdleTimeout must not be negative.");
ulong ms = (ulong)options.IdleTimeout.Ticks / TimeSpan.TicksPerMillisecond;
if (ms > (1ul << 62) - 1) throw new Exception("IdleTimeout is too large (max 2^62-1 milliseconds)");
settings.IsSetFlags |= QuicSettingsIsSetFlags.IdleTimeoutMs;
settings.IdleTimeoutMs = (ulong)options.IdleTimeout.TotalMilliseconds;
}

When timeout is Timeout.InfiniteTimeSpan we should set the value to 0.
If we skip setting it, default 30s timeout would still apply.

There is separate timeout setting for Connect. So if somebody wishes to control that either by allowing more time on slow network or vice versa they currently cannot do that via timeouts. (smaller timeout can be enforced via cancellation token as mitigation ) We can either apply current timeout in both cases or split the timeout setting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions