diff --git a/test/sequential/test-http-regr-gh-2928.js b/test/sequential/test-http-regr-gh-2928.js index 149aaeb6e6e420..0967f3dda2a48b 100644 --- a/test/sequential/test-http-regr-gh-2928.js +++ b/test/sequential/test-http-regr-gh-2928.js @@ -39,7 +39,9 @@ function execAndClose() { throw e; }); - parser.consume(socket._handle); + socket.on('connect', function() { + parser.consume(socket._handle); + }); parser.onIncoming = function onIncoming() { process.stdout.write('+');