mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
aa8655a0da
If the .listen() hasn't been called on the server, there is no handle object. In this case use null as the triggerAsyncId. Fixes: https://github.com/nodejs/node/issues/13548 PR-URL: https://github.com/nodejs/node/pull/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>
12 lines
321 B
JavaScript
12 lines
321 B
JavaScript
'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());
|