From 89d1149467135f79f1565d9f80d46001e81a3a94 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Wed, 27 Jan 2016 00:44:36 +0100 Subject: [PATCH] test: fix test-tls-zero-clear-in flakiness It can happen that the server-side socket is destroyed before the client-side socket has gracefully closed, thus causing a 'ECONNRESET' error in this socket. To solve this, also close gracefully in the server side too. PR-URL: https://github.com/nodejs/node/pull/4888 Reviewed-By: James M Snell Reviewed-By: Fedor Indutny Reviewed-By: Ben Noordhuis --- test/parallel/test-tls-zero-clear-in.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-tls-zero-clear-in.js b/test/parallel/test-tls-zero-clear-in.js index 33db08a78567fb..652d6d176d7324 100644 --- a/test/parallel/test-tls-zero-clear-in.js +++ b/test/parallel/test-tls-zero-clear-in.js @@ -22,7 +22,7 @@ var server = tls.createServer({ }, function(c) { // Nop setTimeout(function() { - c.destroy(); + c.end(); server.close(); }, 20); }).listen(common.PORT, function() {