Skip to content

Commit 6f780bb

Browse files
committed
Throw exception if DebugProxy received no output
1 parent a3ed9ad commit 6f780bb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Components/WebAssembly/Server/src/DebugProxyLauncher.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,13 @@ private static void CompleteTaskWhenServerIsReady(Process aspNetProcess, TaskCom
117117

118118
void OnOutputDataReceived(object sender, DataReceivedEventArgs eventArgs)
119119
{
120-
if (!String.IsNullOrEmpty(eventArgs.Data) && ApplicationStartedRegex.IsMatch(eventArgs.Data))
120+
if (String.IsNullOrEmpty(eventArgs.Data))
121+
{
122+
taskCompletionSource.TrySetException(new InvalidOperationException(
123+
"No output has been recevied from the application."));
124+
}
125+
126+
if (ApplicationStartedRegex.IsMatch(eventArgs.Data))
121127
{
122128
aspNetProcess.OutputDataReceived -= OnOutputDataReceived;
123129
if (!string.IsNullOrEmpty(capturedUrl))

0 commit comments

Comments
 (0)