bugfix:kill web server when father process exits

This commit is contained in:
想当当 2014-11-10 20:07:33 +08:00
parent bcb1f9d895
commit 344326706e

View File

@ -155,6 +155,7 @@ function proxyServer(option){
console.log('AnyProxy is about to exit with code:', code); console.log('AnyProxy is about to exit with code:', code);
process.exit(); process.exit();
}); });
process.on("uncaughtException",function(err){ process.on("uncaughtException",function(err){
child_webServer.kill(); child_webServer.kill();
console.log('Caught exception: ' + err); console.log('Caught exception: ' + err);