You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
545 B

'use strict';
var assert = require('assert');
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();
});