Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix
  • Loading branch information
indutny committed Dec 8, 2015
commit 91abafd1e0d6d9775c76525386efc1480b6561f5
4 changes: 3 additions & 1 deletion test/parallel/test-tls-inception.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@ a.listen(common.PORT, function() {
rejectUnauthorized: false
});
ssl.setEncoding('utf8');
var buf = '';
ssl.once('data', function(data) {
assert.equal(body.toString(), data);
buf += data;
gotHello = true;
});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be on?
Also, is gotHello really necessary?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arghh... It should be on indeed. @santigimeno would it be interesting to you to submit a PR with a fix for this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotHello seems to be necessary, but could be replaced with common.mustCall in ssl.on('end', ...)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I said about gotHello because would the test exit if no end event was received?
Yes, I can send a PR.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @santigimeno . Please don't forget to cc me on that PR ;)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@indutny PR: #4195. Thanks

ssl.on('end', function() {
assert.equal(buf, body);
ssl.end();
a.close();
b.close();
Expand Down