-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Circuits lifetime and lifecycle #6353
Comments
Blocked is a strong word, you can easily write naive reconnect logic, we even have docs for it. https://docs.microsoft.com/en-us/aspnet/core/signalr/dotnet-client?view=aspnetcore-2.2#handle-lost-connection |
Meeting notes:What is a circuit?
Features
-- Initial pass cut line -- These features don't need to go in the first pass of the feature
UI (load screen \ spinner) for disconnects \ connects
public class Circuit
{
public Circuit(string id)
{
Id = id;
}
public string Id { get; }
} We want to tie the filter to each instance of entry-point (consequently not DI). builder.UseRazorComponents(x => x.UseCircuitManager<MyCircuitManager>());
public abstract class CircuitHandler
{
/// <summary>A new circuit was established.</summary>
public virtual Task OnCircuitOpenedAsync(Circuit circuit, CancellationToken cts) => Task.CompletedTask;
/// <summary>A connection was established for an existing circuit. Fires once initially and each time during reconnect.</summary>
public virtual Task OnConnectionUpAsync(Circuit circuit, CancellationToken cts) => Task.CompletedTask;
/// <summary>A connection was disconnected.</summary>
public virtual Task OnConnectionDownAsync(Circuit circuit, CancellationToken cts) => Task.CompletedTask;
/// <summary>A circuit is being discarded. This would be the place to do things like tomb stoning</summary>
public virtual Task OnCircuitClosedAsync(Circuit circuit, CancellationToken cts) => Task.CompletedTask;
}
// Example of a circuit handler:
public class MyCircuitHandler : CircuitHandler
{
public override Task OnDisconnectedAsync(Circuit circuit, CancellationToken cts);
public override Task OnDisconnectedAsync(Circuit circuit, CancellationToken cts);
} Client side events
|
Introduce CircuitHandler to handle circuit lifetime events Partial fix to #6353
Server primitives are done. Client primitives and reconnects are being tracked via #7537 |
Reconnection
Disconnection API
The text was updated successfully, but these errors were encountered: