dotnet / dotnet/aspnetcore

When using Microsoft.AspNetCore.SignalR.Client with the .NET framework with a transport of Server Sent Events (SSE) stopping a connection takes a long time

Open
#50,839 4 comments 0 reactions 0 assignees View on GitHub
area-signalr
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Describe the bug

Using Microsoft.AspNetCore.SignalR.Client with the .NET framework and setting the transport to Server Sent Events (SSE) takes a long time to stop a connection (~10 seconds).

This seems to occur from 5.* versions of the library onwards.
I don't get this behaviour with other transports or if I use a .NET 6 or 7 client.

### Expected Behavior

Stopping an SSE connection should take a similar amount of time to stopping a web sockets or long polling connection.

### Steps To Reproduce

Minimal example given here using .NET 6 for the server and .NET Framework 4.7.2 for the client:
https://github.com/gklittlejohn/signalrserversentevents

### Exceptions (if any)

_No response_

### .NET Version

7.0.400

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.