Skip to content

System.Threading.Timer.Timer max timeout mismatch #63258

Closed
@zgabi

Description

@zgabi

Description

In the followin line an exception is thrown when timeout is > 0xfffffffe

if (dueTm > MaxSupportedTimeout)
throw new ArgumentOutOfRangeException(nameof(dueTime), SR.ArgumentOutOfRange_TimeoutTooLarge);

internal const uint MaxSupportedTimeout = 0xfffffffe;

The exception message is:

<data name="ArgumentOutOfRange_TimeoutTooLarge" xml:space="preserve">
<value>Time-out interval must be less than 2^32-2.</value>
</data>

Reproduction Steps

Expected behavior

Message should be "less than or equal to 2^32-2" or "less than 2^32-1"

Actual behavior

Wrong exception message

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions