You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class BlazorCircuitHandler() : CircuitHandler
{
public override async Task OnCircuitOpenedAsync(Circuit circuit, CancellationToken cancellationToken)
{
await Task.Delay(2000);
await base.OnCircuitOpenedAsync(circuit, cancellationToken);
}
public override async Task OnCircuitClosedAsync(Circuit circuit, CancellationToken cancellationToken)
{
await base.OnCircuitClosedAsync(circuit, cancellationToken);
}
}
A lot of people use custom Blazor Server CircuitHandler implementations for initializing user state, connecting to SignalR Hubs, etc.
As seen in the video below, if you load a page with an InteractiveServer component, and navigate away before the circuit is opened, the whole circuit breaks. Thus, the whole app breaks.
Expected Behavior
This would be solved with #55127, because enhanced navigation would reopen the broken connection.
Steps To Reproduce
Add custom circuit handler implementation to services
Screen.Recording.2024-12-30.at.2.03.27.AM.mov
Exceptions (if any)
No response
.NET Version
9.0.100
Anything else?
No response
The text was updated successfully, but these errors were encountered:
garrettlondon1
changed the title
[Blazor] Custom CircuitHandler breaks WS connection on navigation
[Blazor] Custom CircuitHandler latency breaks WS connection on navigation
Dec 30, 2024
Is there an existing issue for this?
Describe the bug
namespace Microsoft.AspNetCore.Components.Server.Circuits;
A lot of people use custom Blazor Server CircuitHandler implementations for initializing user state, connecting to SignalR Hubs, etc.
As seen in the video below, if you load a page with an InteractiveServer component, and navigate away before the circuit is opened, the whole circuit breaks. Thus, the whole app breaks.
Expected Behavior
This would be solved with #55127, because enhanced navigation would reopen the broken connection.
Steps To Reproduce
Add custom circuit handler implementation to services
Screen.Recording.2024-12-30.at.2.03.27.AM.mov
Exceptions (if any)
No response
.NET Version
9.0.100
Anything else?
No response
The text was updated successfully, but these errors were encountered: