Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/api/async_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -814,9 +814,9 @@ See the section on [promise execution tracking][].

```js
const server = net.createServer((conn) => {
// The resource that caused (or triggered) this callback to be called
// was that of the new connection. Thus the return value of triggerAsyncId()
// is the asyncId of "conn".
// Returns the triggerAsyncId of the server, not of the new connection,
// because the callback runs in the execution scope of the server's
// MakeCallback().
async_hooks.triggerAsyncId();

}).listen(port, () => {
Expand Down
Loading