Browse Source

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 <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
v4.x
Santiago Gimeno 9 years ago
committed by Myles Borins
parent
commit
84ead62d8d
  1. 2
      test/parallel/test-tls-zero-clear-in.js

2
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() {

Loading…
Cancel
Save