mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 20:37:23 +01:00
adjust command
This commit is contained in:
parent
1516ab73c7
commit
25772dade8
3 changed files with 11 additions and 19 deletions
|
|
@ -72,14 +72,14 @@ public abstract class GrpcBaseService : IHostedService, IDisposable
|
|||
{
|
||||
try
|
||||
{
|
||||
await CheckFaultStateAndResend().ConfigureAwait(false);
|
||||
await CheckFaultStateAndRestore().ConfigureAwait(false);
|
||||
}
|
||||
catch { SetGrpcFaulty(); }
|
||||
await Task.Delay(250).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
private async Task CheckFaultStateAndResend()
|
||||
private async Task CheckFaultStateAndRestore()
|
||||
{
|
||||
if (GrpcIsFaulty)
|
||||
{
|
||||
|
|
@ -96,8 +96,6 @@ public abstract class GrpcBaseService : IHostedService, IDisposable
|
|||
{
|
||||
var result = await toExecute.ConfigureAwait(false);
|
||||
|
||||
await CheckFaultStateAndResend().ConfigureAwait(false);
|
||||
|
||||
return result;
|
||||
}
|
||||
catch
|
||||
|
|
@ -113,7 +111,7 @@ public abstract class GrpcBaseService : IHostedService, IDisposable
|
|||
try
|
||||
{
|
||||
await toExecute.ConfigureAwait(false);
|
||||
await CheckFaultStateAndResend().ConfigureAwait(false);
|
||||
await CheckFaultStateAndRestore().ConfigureAwait(false);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue