amqplib 0.5.5 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -3
- package/Makefile +3 -2
- package/README.md +1 -1
- package/bin/generate-defs.js +1 -1
- package/examples/tutorials/package.json +1 -1
- package/lib/defs.js +166 -184
- package/lib/mux.js +6 -21
- package/package-lock.json +942 -30
- package/package.json +6 -6
- package/test/frame.js +1 -1
- package/test/mux.js +37 -3
package/lib/mux.js
CHANGED
|
@@ -55,26 +55,11 @@ Mux.prototype._readIncoming = function() {
|
|
|
55
55
|
// are empty, or we exhaust our ability to accept chunks.
|
|
56
56
|
function roundrobin(streams) {
|
|
57
57
|
var s;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
var chunk = s.read();
|
|
64
|
-
if (chunk !== null) {
|
|
65
|
-
accepting = out.write(chunk);
|
|
66
|
-
}
|
|
67
|
-
else break;
|
|
68
|
-
}
|
|
69
|
-
if (!accepting) streams.push(s);
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
while (accepting && (s = streams.shift())) {
|
|
73
|
-
var chunk = s.read();
|
|
74
|
-
if (chunk !== null) {
|
|
75
|
-
accepting = out.write(chunk);
|
|
76
|
-
streams.push(s);
|
|
77
|
-
}
|
|
58
|
+
while (accepting && (s = streams.shift())) {
|
|
59
|
+
var chunk = s.read();
|
|
60
|
+
if (chunk !== null) {
|
|
61
|
+
accepting = out.write(chunk);
|
|
62
|
+
streams.push(s);
|
|
78
63
|
}
|
|
79
64
|
}
|
|
80
65
|
}
|
|
@@ -105,7 +90,7 @@ Mux.prototype._readIncoming = function() {
|
|
|
105
90
|
|
|
106
91
|
Mux.prototype._scheduleRead = function() {
|
|
107
92
|
var self = this;
|
|
108
|
-
|
|
93
|
+
|
|
109
94
|
if (!self.scheduledRead) {
|
|
110
95
|
schedule(function() {
|
|
111
96
|
self.scheduledRead = false;
|