Skip to content

ServiceConnectionNotActiveException from ServiceConnection.ProcessOutgoingMessagesAsync  #1632

@vicancy

Description

@vicancy

Describe the bug

When the server connection is closed, if the Hub level writes data into the client connection Application Input, since it fails to deliver messages out through the server connection, ServiceConnectionNotActiveException throws

Details

ProcessOutgoingMessageAsync processes Application Input pipeline. When using AzureSignalR, messages such as GroupSend UserSend messages (actions going through lifetime manager) do not write into this pipeline but write into server connections directly. Messages written into the Application Input pipeline include: Ping, Completion, and StreamItem. https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/HubProtocol.md

Improvements

Such exception logs worry our customers.

When the server connection is closed, the client connection routed to this server connection is closed. We can choose to stop the message delivery from server to service because anyway the client connection is already closed. Having a connection closed log should be enough.

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