Skip to content

Commit 429a432

Browse files
Check for null during node process disposal. Fixesaspnet#1061
1 parent 76928bc commit 429a432

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/Microsoft.AspNetCore.NodeServices/HostingModels/OutOfProcessNodeInstance.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ protected virtual void Dispose(bool disposing)
297297

298298
// Make sure the Node process is finished
299299
// TODO: Is there a more graceful way to end it? Or does this still let it perform any cleanup?
300-
if(!_nodeProcess.HasExited)
300+
if(_nodeProcess!=null&&!_nodeProcess.HasExited)
301301
{
302302
_nodeProcess.Kill();
303303
}

0 commit comments

Comments
(0)