Throw exception if DebugProxy received no output

This commit is contained in:
Safia Abdalla 2020-08-28 08:04:22 -07:00
parent a3ed9add5d
commit 6f780bb9ea
1 changed files with 7 additions and 1 deletions

View File

@ -117,7 +117,13 @@ namespace Microsoft.AspNetCore.Builder
void OnOutputDataReceived(object sender, DataReceivedEventArgs eventArgs)
{
if (!String.IsNullOrEmpty(eventArgs.Data) && ApplicationStartedRegex.IsMatch(eventArgs.Data))
if (String.IsNullOrEmpty(eventArgs.Data))
{
taskCompletionSource.TrySetException(new InvalidOperationException(
"No output has been recevied from the application."));
}
if (ApplicationStartedRegex.IsMatch(eventArgs.Data))
{
aspNetProcess.OutputDataReceived -= OnOutputDataReceived;
if (!string.IsNullOrEmpty(capturedUrl))