Skip to content

Blazor Server Kestrel keep-alive client-server communication after disconnect #39615

Closed
@emetrix

Description

@emetrix

I'm creating a .net 6 AspNet Core Blazor server application hosted by Kestrel within a docker container which uses a custom timeout handling on client side. Once the application is not used for e.g. 30 minutes a dialog is displayed and the page needs a reload for further usage.
For saving server and network resources after the client timeout occurs I'm trying to stop the application/connection by calling "Blazor.disconnect();" on the client side.

But I've noticed that after calling Blazor.disconnect() and displaying the information message the client the server the client and the server are still exchanging keep-alive data like this:

Sent a ping message to the client. [Microsoft.AspNetCore.SignalR.HubConnectionContext]
Sending payload: 3 bytes [Microsoft.AspNetCore.Http.Connections.Internal.Transports.WebSocketsTransport]
Message received. Type: Binary, size: 3, EndOfMessage: True [Microsoft.AspNetCore.Http.Connections.Internal.Transports.WebSocketsTransport]

Therefore I'm looking for a way to completely disconnect the client and free resouces of the connection on the server.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions