add some debugging info

This commit is contained in:
Stanley Dimant
2022-10-09 15:23:29 +02:00
parent 46d851b9f0
commit e1519f2497
2 changed files with 7 additions and 8 deletions

View File

@@ -103,17 +103,16 @@ internal class IdentityService : IdentificationService.IdentificationServiceBase
try
{
while (true)
while (!context.CancellationToken.IsCancellationRequested)
{
if (identChanges.ContainsKey(server) && identChanges[server].TryDequeue(out var cur))
while (identChanges.ContainsKey(server) && identChanges[server].TryDequeue(out var cur))
{
_logger.LogInformation("Sending " + cur.UidWithIdent.Uid.Uid + " to " + server);
await responseStream.WriteAsync(cur).ConfigureAwait(false);
}
else
{
await Task.Delay(10).ConfigureAwait(false);
}
_logger.LogInformation("Queue for " + server + " is empty: " + identChanges[server].IsEmpty);
await Task.Delay(10).ConfigureAwait(false);
}
}
catch