mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
1b2749ecbe
Switch the default from `ipv4first` to `verbatim` (return them exactly as the resolver sent them to us). PR-URL: https://github.com/nodejs/node/pull/39987 Fixes: https://github.com/nodejs/node/issues/31566 Refs: https://github.com/nodejs/node/issues/6307 Refs: https://github.com/nodejs/node/pull/20710 Refs: https://github.com/nodejs/node/pull/38099 Co-authored-by: treysis <treysis@gmx.net> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
16 lines
460 B
JavaScript
16 lines
460 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const net = require('net');
|
|
|
|
const server = net.createServer(common.mustCall(function(s) {
|
|
server.close();
|
|
s.end();
|
|
})).listen(0, '127.0.0.1', common.mustCall(function() {
|
|
const socket = net.connect(this.address().port, '127.0.0.1');
|
|
socket.on('end', common.mustCall(() => {
|
|
assert.strictEqual(socket.writable, true);
|
|
socket.write('hello world');
|
|
}));
|
|
}));
|