Skip to content

Exception in MsQuicStream.HandleWriteStartState can abandon CancellationTokenRegistration #55437

@geoffkizer

Description

@geoffkizer

In HandleWriteStartState, we do some initial checks, then register a CancellationTokenRegistration, and then do some additional checks on SendState that could throw. If these do throw, then the CancellationTokenRegistration is abandoned and could fire at any time in the future, which is not what we want.

At a minimum we should unregister the CancellationTokenRegistration if an exception occurs here. Better, it would be good to avoid registering it until after we have done the checks that may throw. It's not obvious to me if this is valid to do, though.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions