Comparing version 0.9.0 to 0.9.1
@@ -34,5 +34,2 @@ // Open Source Initiative OSI - The MIT License (MIT):Licensing | ||
//How long to wait before sending a message if a remote buffer is full | ||
var REMOTE_WAIT_TIMEOUT = 1000; | ||
//Creates a new socket | ||
@@ -113,2 +110,6 @@ //zmqSocket : Object | ||
}); | ||
//Fix for https://github.com/JustinTulloss/zeromq.node/issues/124 | ||
//TODO: remove when this is fixed | ||
self._keepaliveTimer = setInterval(function() {}, 60000); | ||
} | ||
@@ -137,2 +138,5 @@ | ||
for(var id in this.channels) this.channels[id].close(); | ||
//TODO: remove when this is fixed | ||
clearTimeout(this._keepaliveTimer); | ||
}; | ||
@@ -139,0 +143,0 @@ |
@@ -40,3 +40,3 @@ // Open Source Initiative OSI - The MIT License (MIT):Licensing | ||
function curTime() { | ||
return new Date().getTime(); | ||
return Date.now(); | ||
} | ||
@@ -43,0 +43,0 @@ |
{ | ||
"name": "zerorpc", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"main": "./index.js", | ||
@@ -30,3 +30,3 @@ "author": "dotCloud <opensource@dotcloud.com>", | ||
"underscore": "1.3.3", | ||
"msgpack2": "0.1.7", | ||
"msgpack2": "0.1.10", | ||
"node-uuid": "1.3.3", | ||
@@ -33,0 +33,0 @@ "zmq": "2.1.0" |
@@ -38,7 +38,7 @@ zerorpc-node | ||
addMan: function(sentence, reply) { | ||
reply(sentence + ", man!"); | ||
reply(null, sentence + ", man!"); | ||
}, | ||
add42: function(n, reply) { | ||
reply(n + 42); | ||
reply(null, n + 42); | ||
}, | ||
@@ -48,3 +48,3 @@ | ||
for(i=from; i<to; i+=step) { | ||
reply(i, true); | ||
reply(null, i, true); | ||
} | ||
@@ -51,0 +51,0 @@ |
@@ -66,11 +66,18 @@ // Open Source Initiative OSI - The MIT License (MIT):Licensing | ||
setTimeout(function() { | ||
if(!killed) { | ||
//Repeatedly poll for a closed connection - if after 20 seconds | ||
//(2 heartbeats) the connection isn't closed, throw an error | ||
var numChecks = 0; | ||
var checkTimeout = setInterval(function() { | ||
if(killed) { | ||
clearTimeout(checkTimeout); | ||
test.done(); | ||
return; | ||
} | ||
if(numChecks++ == 20) { | ||
test.ok(false, "Connection not closed on the remote end"); | ||
} | ||
test.done(); | ||
}, 11000); | ||
}, 1000); | ||
} | ||
}); | ||
}; |
@@ -48,4 +48,3 @@ // Open Source Initiative OSI - The MIT License (MIT):Licensing | ||
exports.testSlowStream = function(test) { | ||
test.expect(18); | ||
function lazyIterRunner(test, callback) { | ||
var nextExpected = 10; | ||
@@ -59,3 +58,3 @@ | ||
test.equal(more, false); | ||
test.done(); | ||
callback(); | ||
} else { | ||
@@ -67,2 +66,15 @@ test.equal(res, nextExpected); | ||
}); | ||
}; | ||
} | ||
exports.testConcurrentRequests = function(test) { | ||
test.expect(90); | ||
var results = 0; | ||
for(var i=0; i<5; i++) { | ||
lazyIterRunner(test, function() { | ||
results++; | ||
if(results === 5) test.done(); | ||
}); | ||
} | ||
}; |
57519
1287
+ Addedmsgpack2@0.1.10(transitive)
- Removedmsgpack2@0.1.7(transitive)
Updatedmsgpack2@0.1.10