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.
This commit is contained in:
Fedor Indutny committed 2014-02-16 01:19:54 +04:00
1 parent 0f40eac366
commit 940abd0b19
1 file changed
+4
+4
View File
@@ -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 = {