feat(AuthClient): Konfiguration der Wiederholungsrichtlinie im Falle eines Verbindungsverlustes hinzugefügt.
This commit is contained in:
@@ -17,15 +17,19 @@ public class AuthClient : IAuthClient, IAsyncDisposable
|
||||
|
||||
public AuthClient(IOptions<ClientParams> paramsOptions, HubConnectionBuilder connectionBuilder, ILogger<AuthClient>? logger = null)
|
||||
{
|
||||
_connection = connectionBuilder
|
||||
.WithUrl(paramsOptions.Value.Url)
|
||||
.Build();
|
||||
_params = paramsOptions.Value;
|
||||
|
||||
var cnnBuilder = connectionBuilder.WithUrl(_params.Url);
|
||||
|
||||
// set RetryPolicy if it exists
|
||||
if (_params.RetryPolicy is not null)
|
||||
cnnBuilder = cnnBuilder.WithAutomaticReconnect(_params.RetryPolicy);
|
||||
|
||||
_connection = cnnBuilder.Build();
|
||||
|
||||
_connection.On<string, string>(nameof(ReceiveKeyAsync), ReceiveKeyAsync);
|
||||
|
||||
_logger = logger;
|
||||
|
||||
_params = paramsOptions.Value;
|
||||
_logger = logger;
|
||||
|
||||
_lazyInitiator = new(async () =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user