diff --git a/src/timeout/NServiceBus.Timeout.Hosting.Windows/TimeoutPersisterReceiver.cs b/src/timeout/NServiceBus.Timeout.Hosting.Windows/TimeoutPersisterReceiver.cs index 793112f01ce..1ad8b50ae55 100644 --- a/src/timeout/NServiceBus.Timeout.Hosting.Windows/TimeoutPersisterReceiver.cs +++ b/src/timeout/NServiceBus.Timeout.Hosting.Windows/TimeoutPersisterReceiver.cs @@ -26,7 +26,7 @@ public TimeoutPersisterReceiver(IManageTimeouts timeoutsManager) { timeoutsManager.TimeoutPushed += TimeoutsManagerOnTimeoutPushed; - SecondsToSleepBetweenPolls = 5; + SecondsToSleepBetweenPolls = 1; workerThread = new Thread(Poll) { IsBackground = true }; } @@ -64,7 +64,7 @@ void Poll() { if (nextRetrieval > DateTime.UtcNow) { - Thread.Sleep(TimeSpan.FromSeconds(Math.Min(Math.Max((nextRetrieval - DateTime.UtcNow).TotalSeconds, 0), SecondsToSleepBetweenPolls))); + Thread.Sleep(SecondsToSleepBetweenPolls*1000); continue; }