diff --git a/test/sequential/test-net-server-address.js b/test/sequential/test-net-server-address.js index 8c57cb742e2d02..ddc65c2df2b828 100644 --- a/test/sequential/test-net-server-address.js +++ b/test/sequential/test-net-server-address.js @@ -19,6 +19,11 @@ server_ipv4.listen(common.PORT, common.localhostIPv4, function() { server_ipv4.close(); }); +if (!common.hasIPv6) { + console.log('1..0 # Skipped: ipv6 part of test, no IPv6 support'); + return; +} + // Test on IPv6 Server var localhost_ipv6 = '::1'; var family_ipv6 = 'IPv6'; @@ -36,11 +41,6 @@ server_ipv6.listen(common.PORT, localhost_ipv6, function() { server_ipv6.close(); }); -if (!common.hasIPv6) { - console.log('1..0 # Skipped: ipv6 part of test, no IPv6 support'); - return; -} - // Test without hostname or ip var anycast_ipv6 = '::'; var server1 = net.createServer();