diff --git a/binding.cc b/binding.cc index f1f9d116..897ef3f5 100644 --- a/binding.cc +++ b/binding.cc @@ -1519,7 +1519,9 @@ namespace zmq { opts_binary.insert(48); // ZMQ_CURVE_PUBLICKEY opts_binary.insert(49); // ZMQ_CURVE_SECRETKEY opts_binary.insert(50); // ZMQ_CURVE_SERVERKEY + opts_int.insert(51); //ZMQ_PROBE_ROUTER opts_binary.insert(55); // ZMQ_ZAP_DOMAIN + opts_int.insert(66); //ZMQ_HANDSHAKE_IVL #endif NODE_DEFINE_CONSTANT(target, ZMQ_CAN_DISCONNECT); diff --git a/package.json b/package.json index 37b99edc..c6dd9399 100644 --- a/package.json +++ b/package.json @@ -10,13 +10,13 @@ }, "dependencies": { "bindings": "~1.2.1", - "nan": "~2.4.0", + "nan": "^2.4.0", "prebuild": "^4.2.2" }, "devDependencies": { - "mocha": "~1.13.0", - "semver": "~4.1.1", - "should": "2.1.x" + "mocha": "^3.1.0", + "semver": "^5.3.0", + "should": "^11.1.0" }, "engines": { "node": ">=0.8" diff --git a/test/socket.monitor.js b/test/socket.monitor.js index 0e464432..92f7bf51 100644 --- a/test/socket.monitor.js +++ b/test/socket.monitor.js @@ -10,8 +10,7 @@ describe('socket.monitor', function() { it('should be able to monitor the socket', function(done) { var rep = zmq.socket('rep') - , req = zmq.socket('req') - , events = []; + , req = zmq.socket('req'); rep.on('message', function(msg){ msg.should.be.an.instanceof(Buffer); @@ -25,14 +24,10 @@ describe('socket.monitor', function() { // Test the endpoint addr arg event_endpoint_addr.toString().should.equal('tcp://127.0.0.1:5423'); - // If this is a disconnect event we can now close the rep socket - if (e === 'disconnect') { - rep.close(); - } - testedEvents.pop(); if (testedEvents.length === 0) { rep.unmonitor(); + rep.close(); done(); } }); @@ -62,7 +57,7 @@ describe('socket.monitor', function() { // We will try to connect to a non-existing server, zmq will issue events: "connect_retry", "close", "connect_retry" // The connect_retry will be issued immediately after the close event, so we will measure the time between the close - // event and connect_retry event, those should >= 10 (this will tell us that we are reading 1 event at a time from + // event and connect_retry event, those should >= 9 (this will tell us that we are reading 1 event at a time from // the monitor socket). var closeTime; @@ -74,7 +69,7 @@ describe('socket.monitor', function() { var diff = Date.now() - closeTime; req.unmonitor(); req.close(); - diff.should.be.within(10, 20); + diff.should.be.within(9, 20); done(); });