Open
Description
The code below uses bindEmitter
to bind the response object to the current context.
So onfinish
must keep the context, right?
// bind
process.namespaces.app.bindEmitter(this.res);
// plan onfinish in the future
this.res.once('finish', onfinish);
var mark = Math.random();
console.log(mark, process.namespaces.app.get('requestId'));
// onfinish will trigger later, but in current context?
function onfinish(event) {
console.log(mark, process.namespaces.app.get('requestId'));
}
For same mark
, the requestId
must be same?
I'm asking, because it's not.