test: discard data received by client

This test was timing out after update to OpenSSL-1.1.1e.

PR-URL: https://github.com/nodejs/node/pull/32328
Fixes: https://github.com/nodejs/node/issues/32210
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
pull/32078/head
Hassaan Pasha 2020-03-19 12:35:34 +05:00 committed by James M Snell
parent ec144d5628
commit 3d0f2257be
1 changed files with 1 additions and 0 deletions

View File

@ -37,6 +37,7 @@ const timeout = setTimeout(() => cleanUp('Timeouted'), 5000);
function waitForPort(port, cb) {
const socket = net.connect(common.PORT, () => {
socket.on('data', () => {});
socket.end();
socket.on('end', cb);
});