You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
528 B

'use strict';
const common = require('../common');
const http = require('http');
const server = http.createServer(common.mustNotCall());
class Agent extends http.Agent {
createConnection(options, oncreate) {
const socket = super.createConnection(options, oncreate);
socket.once('close', () => server.close());
return socket;
}
}
common.refreshTmpDir();
server.listen(common.PIPE, common.mustCall(() => {
const req = http.get({
agent: new Agent(),
socketPath: common.PIPE
});
req.abort();
}));