mirror of
https://github.com/nodejs/node.git
synced 2025-05-18 11:29:35 +00:00

Some of the TLS tests have variables that do not get used. This removes those variables. PR-URL: https://github.com/nodejs/node/pull/4424 Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
29 lines
513 B
JavaScript
29 lines
513 B
JavaScript
'use strict';
|
|
var common = require('../common');
|
|
|
|
if (!common.hasCrypto) {
|
|
console.log('1..0 # Skipped: missing crypto');
|
|
return;
|
|
}
|
|
var tls = require('tls');
|
|
var stream = require('stream');
|
|
|
|
var delay = new stream.Duplex({
|
|
read: function read() {
|
|
},
|
|
write: function write(data, enc, cb) {
|
|
console.log('pending');
|
|
setTimeout(function() {
|
|
console.log('done');
|
|
cb();
|
|
}, 200);
|
|
}
|
|
});
|
|
|
|
var secure = tls.connect({
|
|
socket: delay
|
|
});
|
|
setImmediate(function() {
|
|
secure.destroy();
|
|
});
|