Skip to content

Commit

Permalink
test: deflake test-tls-socket-close
Browse files Browse the repository at this point in the history
Move the check for the destroyed state of the remote socket to the inner
`setImmediate()`.

Refs: nodejs#49327 (comment)
PR-URL: nodejs#49575
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
  • Loading branch information
lpinca authored Sep 13, 2023
1 parent 2a14a79 commit ccf46ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-tls-socket-close.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ function connectClient(server) {

setImmediate(() => {
assert.strictEqual(netSocket.destroyed, true);
assert.strictEqual(clientTlsSocket.destroyed, true);

setImmediate(() => {
assert.strictEqual(clientTlsSocket.destroyed, true);
assert.strictEqual(serverTlsSocket.destroyed, true);

tlsServer.close();
Expand Down

0 comments on commit ccf46ba

Please sign in to comment.