-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
async-hooks,net: ensure asyncId=null if no handle
If the .listen() hasn't been called on the server, there is no handle object. In this case use null as the triggerAsyncId. Fixes: #13548 PR-URL: #13938 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
- Loading branch information
Showing
2 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'use strict'; | ||
|
||
const common = require('../common'); | ||
const net = require('net'); | ||
const server = net.createServer(); | ||
|
||
// This test was based on an error raised by Haraka. | ||
// It caused server.getConnections to raise an exception. | ||
// Ref: https://github.com/haraka/Haraka/pull/1951 | ||
|
||
server.getConnections(common.mustCall()); |