Skip to content

Aspnet SignalR server connection not disposed when app shuts down #1959

@bjqian

Description

@bjqian

Describe the bug

When the web app shuts down, due to the adhoc configured here :
All the componets that are injected into the default resolver will be disposed.
But the server connections are managed by serviceManager which doesn't dispose them :

To Reproduce

In the example:

add a delay after the using of WebApp.Start. Press enter in cmd line to trigger dispose. Then the app server will get intp a stucking mode:
The server connection is still alive but it will throw exception like "Cannot access a disposed object.Object name: 'LoggerFactory'.""}. when client connect event is triggered.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions