diff --git a/test/parallel/test-http-server-stale-close.js b/test/parallel/test-http-server-stale-close.js index b72c2b55a02f25..9502d570942e41 100644 --- a/test/parallel/test-http-server-stale-close.js +++ b/test/parallel/test-http-server-stale-close.js @@ -34,10 +34,10 @@ if (process.env.NODE_TEST_FORK_PORT) { req.write('BAM'); req.end(); } else { - const server = http.createServer(function(req, res) { + const server = http.createServer((req, res) => { res.writeHead(200, { 'Content-Length': '42' }); req.pipe(res); - req.on('close', function() { + req.on('close', () => { server.close(); res.end(); });