Closed
Description
When creating a simple HTTPserver and connecting to it one looses the handle context. Meaning there is no way to know what handle or callback created the new handle.
'use strict';
const http = require('http');
const server = http.createServer(function (req, res) {
res.end('hallo world');
});
server.listen(0, 'localhost', function () {
const addr = server.address();
const req = http.get(`http://${addr.address}:${addr.port}`, function (res) {
res.resume();
res.once('end', server.close.bind(server));
});
});
Note that this issues exists even after applying #3216 (adds parent to init hook)
complete test case: https://gist.github.com/AndreasMadsen/f56bbdbcd18a2c6358f3
dprof dump: http://bl.ocks.org/AndreasMadsen/raw/6c460eb0e7d6eeadb31a/
/cc @trevnorris