Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d00b9fc

Browse filesBrowse files
santigimenoMyles Borins
authored andcommitted
test: fix tls-inception flakiness
When sending a very large buffer (400000 bytes) the test fails due to the client socket from the `a` server erroring with `ECONNRESET`. There's a race condition between the closing of this socket and the `ssl` socket closing on the other side of the connection. To improve things, destroy the socket as soon as possible: in the `end` event of the `dest` socket. PR-URL: #4195 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Fedor Indutny <fedor@indutny.com>
1 parent c41b280 commit d00b9fc
Copy full SHA for d00b9fc

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-tls-inception.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-inception.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var net = require('net');
1414

1515
var options, a, b;
1616

17-
var body = new Buffer(4000).fill('A');
17+
var body = new Buffer(400000).fill('A');
1818

1919
options = {
2020
key: fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem')),
@@ -32,7 +32,7 @@ a = tls.createServer(options, function(socket) {
3232
dest.pipe(socket);
3333
socket.pipe(dest);
3434

35-
dest.on('close', function() {
35+
dest.on('end', function() {
3636
socket.destroy();
3737
});
3838
});

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.