Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection to WebSocket disconnects no matter the timeout increases. (Azure SignalR) #246

Open
charlesoto opened this issue Nov 16, 2023 · 2 comments

Comments

@charlesoto
Copy link

charlesoto commented Nov 16, 2023

For both ASP.NET and ASP.NET Core SignalR, when connecting to an Azure SignalR service. If by any reason, the user loses connection to internet, and then sends a message while being offline, the Websocket will close returning a 1006 Close code. By the time the internet comes back (Approximately 7-15 seconds), the message is lost, and the user needs to re click the action in order to send the message again after the hub is reconnected.

I have tried to increate all time outs mentioned here:

https://learn.microsoft.com/en-us/aspnet/signalr/overview/guide-to-the-api/handling-connection-lifetime-events

and

https://learn.microsoft.com/en-us/aspnet/core/signalr/configuration?view=aspnetcore-8.0&tabs=dotnet

How to replicate this issue:

  1. Clone and run any of the samples in this source code (I ran ChatRoom)
  2. Entered the chat and send a first message
  3. Then disconnect the internet (Turn off wifi, disconnect cable, etc) and rapidly send another message.
  4. Wait at least 10 seconds
  5. Turn internet back on
  6. Websocket Close with error:
    image
    image
@charlesoto
Copy link
Author

charlesoto commented Nov 17, 2023 via email

@charlesoto
Copy link
Author

charlesoto commented Nov 17, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant