mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
292016c91e
PR-URL: https://github.com/nodejs/node/pull/51826 Fixes: https://github.com/nodejs/node/issues/50841 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
17 lines
410 B
JavaScript
17 lines
410 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const net = require('net');
|
|
|
|
// Test that the process does not crash.
|
|
const socket = net.connect({
|
|
port: 12345,
|
|
host: 'localhost',
|
|
// Make sure autoSelectFamily is true
|
|
// so that lookupAndConnectMultiple is called.
|
|
autoSelectFamily: true,
|
|
});
|
|
// DNS resolution fails or succeeds
|
|
socket.on('lookup', common.mustCall(() => {
|
|
socket.destroy();
|
|
}));
|