Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

just emit the ack since the stream is already available if listenin f…

…or streamConnect
  • Loading branch information...
commit f71a31b3d8441dc882b234b281754a269eb9ff05 1 parent f2101ef
@substack authored
Showing with 6 additions and 6 deletions.
  1. +1 −1  index.js
  2. +5 −5 test/tls.js
View
2  index.js
@@ -51,7 +51,7 @@ exports.connect = function () {
if (--pending === 0) done();
}
};
- stream.emit('secureConnect', stream, ack);
+ stream.emit('secureConnect', ack);
}
function done () {
View
10 test/tls.js
@@ -56,8 +56,8 @@ test('TLS - unauthorized with callback', {timeout: 1000}, function(t) {
})
});
- c.on('secureConnect', function (s, ack) {
- t.ok(!s.authorized);
+ c.on('secureConnect', function (ack) {
+ t.ok(!c.authorized);
ack.accept();
});
});
@@ -81,9 +81,9 @@ test('TLS - authorized', {timeout: 1000}, function(t) {
})
});
- c.on('secureConnect', function (s, ack) {
- t.ok(s.authorized, "should be authorized");
- if (s.authorized) ack.accept()
+ c.on('secureConnect', function (ack) {
+ t.ok(c.authorized, "should be authorized");
+ if (c.authorized) ack.accept()
else ack.reject()
});
});
Please sign in to comment.
Something went wrong with that request. Please try again.