0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-21 21:19:50 +01:00
nodejs/test/parallel/test-net-server-close-before-calling-lookup-callback.js
Giovanni Bucci 628469c7e1
net: exclude ipv6 loopback addresses from server.listen
Fixes: https://github.com/nodejs/node/issues/51732
PR-URL: https://github.com/nodejs/node/pull/54264
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-08-23 09:11:43 +00:00

8 lines
317 B
JavaScript

'use strict';
const common = require('../common');
const net = require('net');
// Process should exit because it does not create a real TCP server.
// Pass localhost to ensure create TCP handle asynchronously because it causes DNS resolution.
net.createServer().listen(0, 'localhost', common.mustNotCall()).close();