diff --git a/test/parallel/test-tls-sni-option.js b/test/parallel/test-tls-sni-option.js index 375575c78ab635..3a6a231b477f5d 100644 --- a/test/parallel/test-tls-sni-option.js +++ b/test/parallel/test-tls-sni-option.js @@ -115,6 +115,7 @@ let clientError; const server = tls.createServer(serverOptions, function(c) { serverResults.push({ sni: c.servername, authorized: c.authorized }); + c.end(); }); server.on('tlsClientError', function(err) { @@ -135,7 +136,6 @@ function startTest() { clientResults.push( client.authorizationError && (client.authorizationError === 'ERR_TLS_CERT_ALTNAME_INVALID')); - client.destroy(); next(); }); diff --git a/test/parallel/test-tls-sni-server-client.js b/test/parallel/test-tls-sni-server-client.js index 073e95988a3a08..8ab025667ea68a 100644 --- a/test/parallel/test-tls-sni-server-client.js +++ b/test/parallel/test-tls-sni-server-client.js @@ -86,6 +86,7 @@ const clientResults = []; const server = tls.createServer(serverOptions, function(c) { serverResults.push(c.servername); + c.end(); }); server.addContext('a.example.com', SNIContexts['a.example.com']); @@ -107,7 +108,6 @@ function startTest() { clientResults.push( client.authorizationError && (client.authorizationError === 'ERR_TLS_CERT_ALTNAME_INVALID')); - client.destroy(); // Continue start();