From 8895d5b82abf893dec16eff9304b029922e51da3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=BCseyin=20A=C3=A7acak?= Date: Tue, 9 Apr 2024 14:21:22 +0300 Subject: [PATCH 1/2] test: fix test-tls-ticket-cluster.js Ensured connection end is initiated by worker (server) Fixes: https://github.com/nodejs/node/issues/2510 --- test/parallel/test-tls-ticket-cluster.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-tls-ticket-cluster.js b/test/parallel/test-tls-ticket-cluster.js index 089660258cda41..716d4924d9ea32 100644 --- a/test/parallel/test-tls-ticket-cluster.js +++ b/test/parallel/test-tls-ticket-cluster.js @@ -46,7 +46,9 @@ if (cluster.isPrimary) { session: lastSession, rejectUnauthorized: false }, () => { - c.end(); + c.on('end', () => { + c.end(); + }); }).on('close', () => { // Wait for close to shoot off another connection. We don't want to shoot // until a new session is allocated, if one will be. The new session is From 1e09e2ed718f36cb59aa2775a9d342fd661d1fcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=BCseyin=20A=C3=A7acak?= <110401522+huseyinacacak-janea@users.noreply.github.com> Date: Wed, 17 Apr 2024 12:41:40 +0300 Subject: [PATCH 2/2] Update test/parallel/test-tls-ticket-cluster.js Co-authored-by: Luigi Pinca --- test/parallel/test-tls-ticket-cluster.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/parallel/test-tls-ticket-cluster.js b/test/parallel/test-tls-ticket-cluster.js index 716d4924d9ea32..746b8533147f54 100644 --- a/test/parallel/test-tls-ticket-cluster.js +++ b/test/parallel/test-tls-ticket-cluster.js @@ -46,9 +46,7 @@ if (cluster.isPrimary) { session: lastSession, rejectUnauthorized: false }, () => { - c.on('end', () => { - c.end(); - }); + c.on('end', c.end); }).on('close', () => { // Wait for close to shoot off another connection. We don't want to shoot // until a new session is allocated, if one will be. The new session is