Skip to content

Blazor server will not exit gracefully with a connected client. #64304

@po1ntt

Description

@po1ntt

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When Ctrl C event fired blazor server shutdown connections, but clients can reconnect and server will shutdown by timeout.

Image

Expected Behavior

Server doesn't accept any connections while shutdown, and will gracefully exit

Steps To Reproduce

Create empty blazor web app, set to Routes - server side rendering, then connect from browser and try to shutdown server throw Ctrl-C

Image

Exceptions (if any)

No response

.NET Version

9

Anything else?

u can fix this bug with a middleware which will check "IsTerminated" for example, but it doesn't look like a good solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions