Comparing version 2.15.2 to 2.15.3
@@ -0,1 +1,7 @@ | ||
2.15.3 / 2016-6-3 | ||
================= | ||
* 2.15.0 introduced a bug where request sockets could no longer batch up requests. | ||
This release should fix that [ronkorving, jaleigh] | ||
2.15.2 / 2016-5-22 | ||
@@ -2,0 +8,0 @@ ================== |
@@ -685,2 +685,7 @@ /** | ||
this._isFlushingReads = false; | ||
// if many sends happened, but ended up in the queue (eg. in a req/rep scenario where each send must be followed by a | ||
// response), we can try to send again now | ||
this._flushWrites(); | ||
}; | ||
@@ -687,0 +692,0 @@ |
{ | ||
"name": "zmq", | ||
"version": "2.15.2", | ||
"version": "2.15.3", | ||
"description": "Bindings for node.js and io.js to ZeroMQ", | ||
@@ -5,0 +5,0 @@ "main": "index", |
@@ -59,2 +59,38 @@ var zmq = require('..') | ||
it('should support a burst', function (done) { | ||
var rep = zmq.socket('rep'); | ||
var req = zmq.socket('req'); | ||
var n = 10; | ||
rep.on('message', function (msg) { | ||
msg.should.be.an.instanceof(Buffer); | ||
msg.toString().should.equal('hello'); | ||
rep.send('world'); | ||
}); | ||
rep.bind('inproc://reqrepburst', function (error) { | ||
if (error) throw error; | ||
req.connect('inproc://reqrepburst'); | ||
var received = 0; | ||
req.on('message', function(msg){ | ||
msg.should.be.an.instanceof(Buffer); | ||
msg.toString().should.equal('world'); | ||
received += 1; | ||
if (received === n) { | ||
rep.close(); | ||
req.close(); | ||
done(); | ||
} | ||
}); | ||
for (var i = 0; i < n; i += 1) { | ||
req.send('hello'); | ||
} | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
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
1219845
2800