Skip to content

Fix CloseMessage issues #34294

@BrennanConroy

Description

@BrennanConroy

The main issue is that CloseMessage is written to the pipe and then the app task exits, then connection cleanup starts which will complete the transport pipes, this results in a race where the CloseMessage might not get sent if there was any backpressure or thread scheduling was unfavorable for the pipe dispatches.

Additionally, there are scenarios where we would like to specify the reason for closing the connection and it is non-trivial to do that, so we should make it easier.

Potential solutions:
Wait a little after sending the close message to give it time to send
Somehow detect that the close message is sent before completing the app task (with timeout of course)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-signalrIncludes: SignalR clients and serversenhancementThis issue represents an ask for new feature or an enhancement to an existing one

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions