-
Couldn't load subscription status.
- Fork 10.5k
Fix closing SignalR Websocket connection on server close #53288
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
Conversation
| transport = HttpTransportType.WebSockets; | ||
| connection = await GetOrCreateConnectionAsync(context, options); | ||
|
|
||
| if (connection is not null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how can this be null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you attempt to connect with a connection id query string param that doesn't exist on this server instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method name is bad then, GetOrCreateOrNot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😆 this method name is >8 years old now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I blame myself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do too 😉
|
This is great news, thank you @BrennanConroy! Is there a temporary workaround available to prevent a slow shutdown? |
src/SignalR/common/Http.Connections/test/HttpConnectionDispatcherTests.cs
Outdated
Show resolved
Hide resolved
|
/backport to release/8.0 |
|
Started backporting to release/8.0: https://github.com/dotnet/aspnetcore/actions/runs/7545049507 |
Fixes #53165
Regressed in f56c242#diff-1a6e4221ebf9343c0f831c3bddda91e203203f07d212575ad2f413ce3b3e2b34L177
We just never had a "server close" test.