# HG changeset patch # User John "Elwin" Edwards # Date 1338870897 25200 # Node ID cf9d294bc52f47eb37d7a0d729b65e36d4e0e341 # Parent 2ad2b6491aa99ce7fcb896ed0a3beeaa638d9a99 rlgwebd.js: fix reference error httpServer needs to be in the global scope so shutdown() can find it. diff -r 2ad2b6491aa9 -r cf9d294bc52f rlgwebd.js --- a/rlgwebd.js Mon Jun 04 20:45:27 2012 -0700 +++ b/rlgwebd.js Mon Jun 04 21:34:57 2012 -0700 @@ -689,6 +689,8 @@ process.exit(1); } +var httpServer; // declare here so shutdown() can find it + /* Open the control socket before chrooting where it can't be found */ var ctlServer = net.createServer(function (sock) { sock.on('data', conHandler); @@ -719,7 +721,7 @@ tslog("Could not drop permissions: %s", err); process.exit(1); } - var httpServer = http.createServer(webHandler); + httpServer = http.createServer(webHandler); httpServer.listen(8080, "127.0.0.1"); tslog('rlgwebd running at http://127.0.0.1:8080/'); });