From 940abd0b19d65b59cea2c614fbebeae95413f485 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Sat, 15 Feb 2014 15:56:37 +0400 Subject: [PATCH] test: fix tls-honorcipherorder slowness End accepted stream to prevent client fd from hanging in FIN_WAIT_1 state. The 30 second delay was caused by default non-zero SO_LINGER. --- test/simple/test-tls-honorcipherorder.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/simple/test-tls-honorcipherorder.js b/test/simple/test-tls-honorcipherorder.js index 69ea946531a..dac13d72651 100644 --- a/test/simple/test-tls-honorcipherorder.js +++ b/test/simple/test-tls-honorcipherorder.js @@ -44,6 +44,10 @@ function test(honorCipherOrder, clientCipher, expectedCipher, cb) { var server = tls.createServer(soptions, function(cleartextStream) { nconns++; + + // End socket to send CLOSE_NOTIFY and TCP FIN packet, otherwise + // it may hang for ~30 seconds in FIN_WAIT_1 state (at least on OSX). + cleartextStream.end(); }); server.listen(common.PORT, localhost, function() { var coptions = {