mirror of
https://github.com/nodejs/node.git
synced 2025-05-08 14:11:40 +00:00

PR-URL: https://github.com/nodejs/node/pull/10550 Reviewed-By: Rich Trott <rtrott@gmail.com>
17 lines
378 B
JavaScript
17 lines
378 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const http = require('http');
|
|
|
|
var server = http.createServer(common.mustCall(function(req, res) {
|
|
res.end();
|
|
})).listen(0, common.mustCall(function() {
|
|
var options = {
|
|
agent: null,
|
|
port: this.address().port
|
|
};
|
|
http.get(options, common.mustCall(function(res) {
|
|
res.resume();
|
|
server.close();
|
|
}));
|
|
}));
|