Restored Killed console message
Added Started console message Captured possible exception from node process
This commit is contained in:
parent
b5fb560c54
commit
a4c4e20d4e
|
|
@ -75,9 +75,17 @@ namespace Microsoft.AspNet.NodeServices {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var initializationSucceeded = await this._nodeProcessIsReadySource.Task;
|
var task = this._nodeProcessIsReadySource.Task;
|
||||||
|
|
||||||
|
var initializationSucceeded = task
|
||||||
|
.GetAwaiter()
|
||||||
|
.GetResult();
|
||||||
|
|
||||||
if (!initializationSucceeded) {
|
if (!initializationSucceeded) {
|
||||||
throw new InvalidOperationException("The Node.js process failed to initialize");
|
throw new InvalidOperationException("The Node.js process failed to initialize", task.Exception);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Console.WriteLine("Started");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -133,7 +141,8 @@ namespace Microsoft.AspNet.NodeServices {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._nodeProcess != null && !this._nodeProcess.HasExited) {
|
if (this._nodeProcess != null && !this._nodeProcess.HasExited) {
|
||||||
this._nodeProcess.Kill(); // TODO: Is there a more graceful way to end it? Or does this still let it perform any cleanup? System.Console.WriteLine("Killed");
|
this._nodeProcess.Kill(); // TODO: Is there a more graceful way to end it? Or does this still let it perform any cleanup?
|
||||||
|
System.Console.WriteLine("Killed");
|
||||||
}
|
}
|
||||||
|
|
||||||
disposed = true;
|
disposed = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue