Skip to content

Commit f363440

Browse files
committed
update dist
1 parent bf49b48 commit f363440

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed

dist/rhea.js

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,13 @@ Connection.prototype.sasl_failed = function (text, condition) {
453453
};
454454

455455
Connection.prototype._is_fatal = function (error_condition) {
456-
var non_fatal = this.get_option('non_fatal_errors', ['amqp:connection:forced']);
457-
return non_fatal.indexOf(error_condition) < 0;
456+
var all_errors_non_fatal = this.get_option('all_errors_non_fatal', false);
457+
if (all_errors_non_fatal) {
458+
return false;
459+
} else {
460+
var non_fatal = this.get_option('non_fatal_errors', ['amqp:connection:forced']);
461+
return non_fatal.indexOf(error_condition) < 0;
462+
}
458463
};
459464

460465
Connection.prototype._handle_error = function () {
@@ -4270,19 +4275,22 @@ types.Reader.prototype.read = function () {
42704275
return constructor.descriptor ? types.described_nc(constructor.descriptor, value) : value;
42714276
};
42724277

4273-
types.Reader.prototype.read_constructor = function () {
4278+
types.Reader.prototype.read_constructor = function (descriptors) {
42744279
var code = this.read_typecode();
42754280
if (code === 0x00) {
4276-
var d = [];
4277-
d.push(this.read());
4278-
var c = this.read_constructor();
4279-
while (c.descriptor) {
4280-
d.push(c.descriptor);
4281-
c = this.read_constructor();
4282-
}
4283-
return {'typecode': c.typecode, 'descriptor': d.length === 1 ? d[0] : d};
4281+
if (descriptors === undefined) {
4282+
descriptors = [];
4283+
}
4284+
descriptors.push(this.read());
4285+
return this.read_constructor(descriptors);
42844286
} else {
4285-
return {'typecode': code};
4287+
if (descriptors === undefined) {
4288+
return {'typecode': code};
4289+
} else if (descriptors.length === 1) {
4290+
return {'typecode': code, 'descriptor': descriptors[0]};
4291+
} else {
4292+
return {'typecode': code, 'descriptor': descriptors[0], 'descriptors': descriptors};
4293+
}
42864294
}
42874295
};
42884296

dist/rhea.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rhea.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)