2015-05-19 13:00:06 +02:00
|
|
|
'use strict';
|
2016-07-15 21:43:24 +02:00
|
|
|
const common = require('../common');
|
2016-12-31 00:38:06 +01:00
|
|
|
const http = require('http');
|
2017-01-08 14:19:00 +01:00
|
|
|
const server = http.createServer(function(req, res) {
|
2015-02-25 01:11:11 +01:00
|
|
|
res.end();
|
|
|
|
});
|
2016-07-15 21:43:24 +02:00
|
|
|
|
|
|
|
server.listen(0, common.mustCall(function() {
|
2017-01-08 14:19:00 +01:00
|
|
|
const req = http.request({
|
2016-05-29 09:06:56 +02:00
|
|
|
port: this.address().port
|
2017-02-03 20:54:19 +01:00
|
|
|
}, common.mustNotCall());
|
2015-02-25 01:11:11 +01:00
|
|
|
|
2016-07-15 21:43:24 +02:00
|
|
|
req.on('abort', common.mustCall(function() {
|
2015-02-25 01:11:11 +01:00
|
|
|
server.close();
|
2016-07-15 21:43:24 +02:00
|
|
|
}));
|
2015-02-25 01:11:11 +01:00
|
|
|
|
|
|
|
req.end();
|
|
|
|
req.abort();
|
|
|
|
req.abort();
|
2016-07-15 21:43:24 +02:00
|
|
|
}));
|