diff --git a/src/Infrastructure/BotSharp.Core/Infrastructures/DistributedLocker.cs b/src/Infrastructure/BotSharp.Core/Infrastructures/DistributedLocker.cs index c2aac231..a5373cd1 100644 --- a/src/Infrastructure/BotSharp.Core/Infrastructures/DistributedLocker.cs +++ b/src/Infrastructure/BotSharp.Core/Infrastructures/DistributedLocker.cs @@ -31,7 +31,7 @@ public class DistributedLocker } } - public async Task Lock(string resource, Func action, int timeoutInSeconds = 30) + public async Task Lock(string resource, Action action, int timeoutInSeconds = 30) { await ConnectToRedis(); @@ -45,7 +45,7 @@ public class DistributedLocker Serilog.Log.Logger.Error($"Acquire lock for {resource} failed due to after {timeout}s timeout."); } - return action(); + action(); } }