1'use strict'; 2const common = require('../common'); 3const http = require('http'); 4 5const server = http.createServer((req, res) => res.flushHeaders()); 6 7server.listen(common.mustCall(() => { 8 const req = 9 http.get({ port: server.address().port }, common.mustCall((res) => { 10 res.on('timeout', common.mustCall(() => req.destroy())); 11 res.setTimeout(1); 12 server.close(); 13 })); 14})); 15