Skip to content

Commit

Permalink
Merge pull request stratisproject#172 from codingupastorm/channels
Browse files Browse the repository at this point in the history
Log something when CA call fails for synchronize members
  • Loading branch information
codingupastorm authored Feb 5, 2020
2 parents 85729f9 + e330e8a commit 951cf1a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Stratis.Feature.PoA.Tokenless/TokenlessFeature.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
Expand Down Expand Up @@ -96,7 +97,15 @@ public override async Task InitializeAsync()
// Initialize the CA public key / federaton member voting loop.
this.caPubKeysLoop = this.asyncProvider.CreateAndRunAsyncLoop("PeriodicCAKeys", async (cancellation) =>
{
await this.SynchronizeMembersAsync();
try
{
await this.SynchronizeMembersAsync();
}
catch (Exception e)
{
this.logger.LogDebug(e, "Exception raised when calling CA to synchronize members.");
this.logger.LogWarning("Could not synchronize members with CA. CA is possibly down! Will retry in 1 minute.");
}
},
this.nodeLifetime.ApplicationStopping,
repeatEvery: TimeSpans.Minute,
Expand Down

0 comments on commit 951cf1a

Please sign in to comment.