Skip to content

Commit be59bd0

Browse files
committed
Optimizing the is running logic to fail fast incase of a known error
1 parent 6b1e044 commit be59bd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WebJobs.Script.WebHost/Handlers/WebScriptHostHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage
4848
// initialize. This might happen if http requests come in while the
4949
// host is starting up for the first time, or if it is restarting.
5050
TimeSpan timeWaited = TimeSpan.Zero;
51-
while (!scriptHostManager.IsRunning && (timeWaited < _hostTimeoutSeconds))
51+
while (!scriptHostManager.IsRunning && scriptHostManager.LastError == null && (timeWaited < _hostTimeoutSeconds))
5252
{
5353
await Task.Delay(_hostRunningPollIntervalMs);
5454
timeWaited += TimeSpan.FromMilliseconds(_hostRunningPollIntervalMs);

0 commit comments

Comments
 (0)