From 344326706ec2e950568dedec88c4ff759963ff75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=83=B3=E5=BD=93=E5=BD=93?= Date: Mon, 10 Nov 2014 20:07:33 +0800 Subject: [PATCH] bugfix:kill web server when father process exits --- proxy.js | 1 + 1 file changed, 1 insertion(+) diff --git a/proxy.js b/proxy.js index 62f7b52..4a84878 100644 --- a/proxy.js +++ b/proxy.js @@ -155,6 +155,7 @@ function proxyServer(option){ console.log('AnyProxy is about to exit with code:', code); process.exit(); }); + process.on("uncaughtException",function(err){ child_webServer.kill(); console.log('Caught exception: ' + err);