Skip to content

Commit

Permalink
test: fix test-tls-zero-clear-in flakiness
Browse files Browse the repository at this point in the history
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 <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
santigimeno authored and Myles Borins committed Feb 17, 2016
1 parent 853f002 commit 670de1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-tls-zero-clear-in.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var server = tls.createServer({
}, function(c) {
// Nop
setTimeout(function() {
c.destroy();
c.end();
server.close();
}, 20);
}).listen(common.PORT, function() {
Expand Down

0 comments on commit 670de1f

Please sign in to comment.