Comparing version 0.4.1 to 0.4.2
@@ -13,2 +13,9 @@ var EventEmitter = require('events').EventEmitter; | ||
self.once = function (name, cb) { | ||
self.on(name, function f () { | ||
self.removeListener(name, f); | ||
cb.apply(self, arguments); | ||
}); | ||
}; | ||
var scrubber = new Scrubber; | ||
@@ -49,2 +56,7 @@ self.end = function () { | ||
// emitted by recon | ||
stream.on('drop', function () { | ||
self.emit('drop'); | ||
}); | ||
self.sendRequest = function (method, args) { | ||
@@ -51,0 +63,0 @@ if (stream.readyState != 'open') { |
{ | ||
"name" : "dnode", | ||
"version" : "0.4.1", | ||
"version" : "0.4.2", | ||
"description" : "Transparently call remote callbacks", | ||
@@ -5,0 +5,0 @@ "modules" : { |
@@ -9,2 +9,6 @@ var dnode = require('dnode'); | ||
var dto = setTimeout(function () { | ||
assert.fail('never dropped'); | ||
}, 10000); | ||
var server1 = dnode({ | ||
@@ -18,2 +22,5 @@ decify : function (n, cb) { cb(n * 10) }, | ||
clearTimeout(to); | ||
conn.once('drop', function () { | ||
clearTimeout(dto); | ||
}); | ||
@@ -20,0 +27,0 @@ remote.decify(5, function (x) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
105130
2328