The AsyncResource required for a callback should be constructed when the callback is stored for later invocation. This allows the async context to be restored at the callback invocation time. Currently the AsyncResource is constructed at callback invocation time and doesn't restore the correct async context.
The AsyncResource required for a callback should be constructed when the callback is stored for later invocation. This allows the async context to be restored at the callback invocation time. Currently the AsyncResource is constructed at callback invocation time and doesn't restore the correct async context.