mirror of
https://github.com/nodejs/node.git
synced 2025-05-06 22:56:06 +00:00

Manually fix issues that eslint --fix couldn't do automatically. PR-URL: https://github.com/nodejs/node/pull/10685 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
25 lines
654 B
JavaScript
25 lines
654 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const http = require('http');
|
|
|
|
const server = http.createServer(function(req, res) {
|
|
intentionally_not_defined(); // eslint-disable-line no-undef
|
|
res.writeHead(200, {'Content-Type': 'text/plain'});
|
|
res.write('Thank you, come again.');
|
|
res.end();
|
|
});
|
|
|
|
server.listen(0, function() {
|
|
for (let i = 0; i < 4; i += 1) {
|
|
http.get({ port: this.address().port, path: '/busy/' + i });
|
|
}
|
|
});
|
|
|
|
let exception_count = 0;
|
|
|
|
process.on('uncaughtException', function(err) {
|
|
console.log('Caught an exception: ' + err);
|
|
if (err.name === 'AssertionError') throw err;
|
|
if (++exception_count === 4) process.exit(0);
|
|
});
|