Skip to content

Commit

Permalink
fixup! test: remove timers from test-tls-socket-close
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinca committed May 16, 2024
1 parent 5581681 commit 43ed949
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/parallel/test-tls-socket-close.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ let netSocketCloseEmitted = false;
const netServer = net.createServer((socket) => {
netSocket = socket;
tlsServer.emit('connection', socket);
socket.on('close', () => {
socket.on('close', common.mustCall(() => {
netSocketCloseEmitted = true;
assert.strictEqual(serverTlsSocket.destroyed, true);
});
}));
}).listen(0, common.mustCall(() => {
connectClient(netServer);
}));
Expand Down Expand Up @@ -61,9 +61,6 @@ function connectClient(server) {
// Close callbacks are executed after `setImmediate()` callbacks.
assert.strictEqual(netSocketCloseEmitted, false);
assert.strictEqual(serverTlsSocket.destroyed, false);
setImmediate(() => {
assert.strictEqual(netSocketCloseEmitted, true);
});
});
});

Expand Down

0 comments on commit 43ed949

Please sign in to comment.