node: fix test-net-server-close-before-calling-lookup-callback.js (#18103)

This commit is contained in:
Meghan Denny
2025-03-12 13:21:24 -08:00
committed by GitHub
parent 7ee0b428d6
commit d2ecce272c

View File

@@ -0,0 +1,7 @@
'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();