mirror of
https://github.com/nodejs/node.git
synced 2025-04-30 15:41: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>
21 lines
401 B
JavaScript
21 lines
401 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const http = require('http');
|
|
const server = http.createServer(function(req, res) {
|
|
res.end();
|
|
});
|
|
|
|
server.listen(0, common.mustCall(function() {
|
|
const req = http.request({
|
|
port: this.address().port
|
|
}, common.fail);
|
|
|
|
req.on('abort', common.mustCall(function() {
|
|
server.close();
|
|
}));
|
|
|
|
req.end();
|
|
req.abort();
|
|
req.abort();
|
|
}));
|