Skip to content

Commit 89d1149

Browse files
santigimenorvagg
authored andcommitted
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: #4888 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 4a6d0ac commit 89d1149

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-tls-zero-clear-in.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var server = tls.createServer({
2222
}, function(c) {
2323
// Nop
2424
setTimeout(function() {
25-
c.destroy();
25+
c.end();
2626
server.close();
2727
}, 20);
2828
}).listen(common.PORT, function() {

0 commit comments

Comments
 (0)