File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -27,20 +27,17 @@ const net = require('net');
2727
2828let conns_closed = 0 ;
2929
30- const remoteAddrCandidates = [ common . localhostIPv4 ] ;
31- if ( common . hasIPv6 ) remoteAddrCandidates . push ( '::1' , '::ffff:127.0.0.1' ) ;
30+ const remoteAddrCandidates = [ common . localhostIPv4 ,
31+ '::1' ,
32+ '::ffff:127.0.0.1' ] ;
3233
33- const remoteFamilyCandidates = [ 'IPv4' ] ;
34- if ( common . hasIPv6 ) remoteFamilyCandidates . push ( 'IPv6' ) ;
34+ const remoteFamilyCandidates = [ 'IPv4' , 'IPv6' ] ;
3535
3636const server = net . createServer ( common . mustCall ( function ( socket ) {
37- // REM: assert.match(socket.remoteAddress,
38- // REM: /^127\.0\.0\.1$|^::1$|^::ffff:127\.0\.0\.1$/);
3937 assert . ok ( remoteAddrCandidates . includes ( socket . remoteAddress ) ,
4038 `Illformed remoteAddress: ${ socket . remoteAddress } ` ) ;
4139 assert . ok ( remoteFamilyCandidates . includes ( socket . remoteFamily ) ,
4240 `Illformed remoteFamily: ${ socket . remoteFamily } ` ) ;
43- // REM: assert.ok(remoteFamilyCandidates.includes(socket.remoteFamily));
4441 assert . ok ( socket . remotePort ) ;
4542 assert . notStrictEqual ( socket . remotePort , this . address ( ) . port ) ;
4643 socket . on ( 'end' , function ( ) {
You can’t perform that action at this time.
0 commit comments