New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

zerorpc

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zerorpc - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

10

lib/socket.js

@@ -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();
});
}
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc