Skip to content
Closed
Changes from all commits
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
10 changes: 5 additions & 5 deletions test/parallel/test-https-client-resume.js
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ const options = {
};

// create server
const server = https.createServer(options, common.mustCall(function(req, res) {
const server = https.createServer(options, common.mustCall((req, res) => {
res.end('Goodbye');
}, 2));

@@ -49,7 +49,7 @@ server.listen(0, function() {
const client1 = tls.connect({
port: this.address().port,
rejectUnauthorized: false
}, function() {
}, () => {
console.log('connect1');
assert.ok(!client1.isSessionReused(), 'Session *should not* be reused.');
session1 = client1.getSession();
@@ -58,7 +58,7 @@ server.listen(0, function() {
'\r\n');
});

client1.on('close', function() {
client1.on('close', () => {
console.log('close1');

const opts = {
@@ -67,15 +67,15 @@ server.listen(0, function() {
session: session1
};

const client2 = tls.connect(opts, function() {
const client2 = tls.connect(opts, () => {
console.log('connect2');
assert.ok(client2.isSessionReused(), 'Session *should* be reused.');
client2.write('GET / HTTP/1.0\r\n' +
'Server: 127.0.0.1\r\n' +
'\r\n');
});

client2.on('close', function() {
client2.on('close', () => {
console.log('close2');
server.close();
});