PR feedback

This commit is contained in:
Luke Tomlinson
2023-03-24 10:21:13 -07:00
parent 0f8ed8f7fc
commit 567c0f33bd
@@ -65,6 +65,7 @@ namespace GitHub.Runner.Listener
int continuousError = 0; int continuousError = 0;
Stopwatch heartbeat = new(); Stopwatch heartbeat = new();
heartbeat.Restart(); heartbeat.Restart();
var maxRetryCount = 10;
while (true) while (true)
{ {
@@ -119,6 +120,10 @@ namespace GitHub.Runner.Listener
// random backoff [15, 30] // random backoff [15, 30]
_getNextMessageRetryInterval = BackoffTimerHelper.GetRandomBackoff(TimeSpan.FromSeconds(15), TimeSpan.FromSeconds(30), _getNextMessageRetryInterval); _getNextMessageRetryInterval = BackoffTimerHelper.GetRandomBackoff(TimeSpan.FromSeconds(15), TimeSpan.FromSeconds(30), _getNextMessageRetryInterval);
} }
else if (continuousError >= maxRetryCount)
{
throw;
}
else else
{ {
// more aggressive backoff [30, 60] // more aggressive backoff [30, 60]