Skip to content
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

Keep showing the disc message after config setting has passed #7731

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Nethermind/Nethermind.Shutter/ShutterP2P.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public async Task Start(Multiaddress[] bootnodeP2PAddresses, Func<Dto.Decryption
{
try
{
using var timeoutSource = new CancellationTokenSource(DisconnectionLogTimeout);
using var timeoutSource = new CancellationTokenSource(TimeSpan.FromMinutes(1));
using var source = CancellationTokenSource.CreateLinkedTokenSource(_cts.Token, timeoutSource.Token);

byte[] msg = await _msgQueue.Reader.ReadAsync(source.Token);
Expand All @@ -119,7 +119,8 @@ public async Task Start(Multiaddress[] bootnodeP2PAddresses, Func<Dto.Decryption
else if (_logger.IsWarn)
{
long delta = DateTimeOffset.Now.ToUnixTimeSeconds() - lastMessageProcessed;
_logger.Warn($"Not receiving Shutter messages ({delta / 60}m)...");
if (delta > DisconnectionLogTimeout.TotalSeconds)
_logger.Warn($"Not receiving Shutter messages ({delta / 60}m)...");
}
}
catch (Exception e)
Expand Down