-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
I have an Asp.Net Core 6 Web Api project. I add SignalR middleware:
builder.Services.AddSignalR(options => { options.ClientTimeoutInterval = TimeSpan.FromSeconds(7); });
I add a handler:
app.MapConnectionHandler<SocialWeatherConnectionHandler>("/weather");
When I turn off client internet connection I don't get any notifications/exceptions. It seem I don't have any way to know whether my client is alive or not.
P.S. When I just close an mobile app or a browser tab I can track it.
Expected Behavior
To get an expection or something like that.
Steps To Reproduce
- Create a simple Asp.Net Core 6 Web Api application.
- Add the SignalR middleware:
builder.Services.AddSignalR(options => { options.ClientTimeoutInterval = TimeSpan.FromSeconds(7); });
- Add a simple handler:
app.MapConnectionHandler<SocialWeatherConnectionHandler>("/weather");
-
Use any web client to connect to the server application by WebSocket on a different machine. After you connect to the server turn off internet connectoin on the client machine.
-
Nothing happens on the server side.
You can use client from https://github.com/aspnet/SignalR/tree/master/samples/SocialWeather/wwwroot/index.html as well as SocialWeatherConnectionHandler.
Exceptions (if any)
No response
.NET Version
net6.0
Anything else?
No response