Skip to content

Commit

Permalink
Changed renew session lock cancellation token and log exception
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianKuesters committed Dec 12, 2023
1 parent afe2467 commit ebf35df
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,17 @@ public async Task HandleMessageAsync(ProcessSessionMessageEventArgs arg)
{
await Task.Delay(_renewSessionLockInterval, renewSessionLockCancellationToken);
Console.WriteLine($"Renewing session lock for session{arg.SessionId}...");
await arg.RenewSessionLockAsync(arg.CancellationToken);
Console.WriteLine($"Renewed session lock for session {arg.SessionId}");
try
{
await arg.RenewSessionLockAsync(renewSessionLockCancellationToken);
Console.WriteLine($"Renewed session lock for session {arg.SessionId}");
}
catch (Exception e)
{
Console.WriteLine($"Failed to renew session lock for session {arg.SessionId}");
Console.WriteLine(e);
throw;
}
}
},
renewSessionLockCancellationTokenSource.Token);
Expand Down

0 comments on commit ebf35df

Please sign in to comment.