Instead of the Node process exiting instantly on file change, send a signal to .NET that it should restart. This is working towards the connection-draining feature.

This commit is contained in:
SteveSandersonMS
2016-07-07 12:01:28 +01:00
parent a19e37f3c0
commit 26e8bd823c
4 changed files with 21 additions and 3 deletions

View File

@@ -184,7 +184,10 @@
var ext = path.extname(filename);
if (extensions.indexOf(ext) >= 0) {
console.log('Restarting due to file change: ' + filename);
process.exit(0);
// Temporarily, the file-watching logic is in Node, so we signal it's time to restart by
// sending the following message back to .NET. Soon the file-watching logic will move over
// to the .NET side, and this whole file can be removed.
console.log('[Microsoft.AspNetCore.NodeServices:Restart]');
}
});
}