Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

msquic itself uses 0 to mean infinite?

Copy link
Contributor Author

@Sundow Sundow Jan 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I understand from #55984 explanation.

And here unmanaged structure documentation seems to agree with it:
https://github.com/microsoft/msquic/blob/main/docs/api/QUIC_SETTINGS.md

Copy link
Member

@ManickaP ManickaP Jan 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, 0 means infinite: https://github.com/microsoft/msquic/blob/4b41f2469b68d2fea0682d6f68854399a239b5bf/docs/api/QUIC_SETTINGS.md#members

How long a connection can go idle before it is gracefully shut down. 0 to disable timeout.

Copy link
Member

@stephentoub stephentoub Jan 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Out of curiosity, how do you say "don't let connections go idle at all"? I'd have expected that to be what 0 meant. Is there a separate "disable pooling entirely" setting or something, or is that just not a thing at all?

EDIT: Ah, this isn't about pooling, it's about how long a connection in use can go without data being transferred?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if I understand what you mean by "don't let connections go idle at all". Do you mean something like keep alive?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EDIT: Ah, this isn't about pooling, it's about how long a connection in use can go without data being transferred?

yep, it's basically auto-close after a time.

}
settings.IsSetFlags |= QuicSettingsIsSetFlags.IdleTimeoutMs;

uint status;
SafeMsQuicConfigurationHandle? configurationHandle;
Expand Down