Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

secrets pulled from seaport work again

  • Loading branch information...
commit 6ac2db8db7568a162ed0245ca5a001e7be195302 1 parent 15c8edb
@substack authored
Showing with 11 additions and 2 deletions.
  1. +11 −2 index.js
View
13 index.js
@@ -62,8 +62,17 @@ Airport.prototype.connect = function (opts, fn) {
if (expired) return;
clearTimeout(timeout);
- queue.forEach(function (cb) { cb(ref) });
- queue = [];
+ if (s.secret && ref && typeof ref.secret === 'function') {
+ ref.secret(s.secret, function (err, ref_) {
+ if (err) return target.emit('error', err);
+ queue.forEach(function (cb) { cb(ref_) });
+ queue = [];
+ });
+ }
+ else {
+ queue.forEach(function (cb) { cb(ref) });
+ queue = [];
+ }
});
u.on('up', function () {
if (expired) return;
Please sign in to comment.
Something went wrong with that request. Please try again.