Skip to content

Commit

Permalink
Set zero (infinite) options timeout in case of Timeout.InfiniteTimeSp…
Browse files Browse the repository at this point in the history
…an (#55984) (#63733)

Co-authored-by: Artem Kliatchkine <eldog@rambler.ru>
  • Loading branch information
Sundow and Artem Kliatchkine committed Jan 18, 2022
1 parent 2eb2e88 commit f04a242
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,13 @@ private static unsafe SafeMsQuicConfigurationHandle Create(QuicOptions options,
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;
}
else
{
settings.IdleTimeoutMs = 0;
}
settings.IsSetFlags |= QuicSettingsIsSetFlags.IdleTimeoutMs;

uint status;
SafeMsQuicConfigurationHandle? configurationHandle;
Expand Down

0 comments on commit f04a242

Please sign in to comment.