Throw exception if DebugProxy received no output
This commit is contained in:
parent
a3ed9add5d
commit
6f780bb9ea
|
|
@ -117,7 +117,13 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
|
|
||||||
void OnOutputDataReceived(object sender, DataReceivedEventArgs eventArgs)
|
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;
|
aspNetProcess.OutputDataReceived -= OnOutputDataReceived;
|
||||||
if (!string.IsNullOrEmpty(capturedUrl))
|
if (!string.IsNullOrEmpty(capturedUrl))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue