From 79368a0ecf8ac4b950f5a3349c0281317c49cb09 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Mon, 4 Jan 2016 17:06:36 -0800 Subject: [PATCH] [test] Remove terminate-when-inactive behavior from the test server It caused #3163. Attempts at having the child exit automatically when the parent exits were stymied by the fact that unix sucks: http://stackoverflow.com/q/284325/52207. --- test/storage/server.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/test/storage/server.js b/test/storage/server.js index cd8c5e395..249c6a124 100755 --- a/test/storage/server.js +++ b/test/storage/server.js @@ -9,19 +9,6 @@ var app = express(); // We're manually setting Etag headers. app.disable('etag'); -// Terminate after a certain time of inactivity. -function terminate() { - console.warn('Server terminated due to inactivity'); - process.exit(0); -}; -var inactivity = 5000; // milliseconds -var timeout = setTimeout(terminate, inactivity); -app.use(function(req, res, next) { - clearTimeout(timeout); - timeout = setTimeout(terminate, inactivity); - next(); -}); - app.get('/test', function (req, res) { if (req.query.modified) { res.setHeader('Last-Modified', (new Date(req.query.modified * 1000)).toUTCString());