Skip to content

Commit

Permalink
update dist
Browse files Browse the repository at this point in the history
  • Loading branch information
grs committed Nov 5, 2021
1 parent bf49b48 commit f363440
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
32 changes: 20 additions & 12 deletions dist/rhea.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,13 @@ Connection.prototype.sasl_failed = function (text, condition) {
};

Connection.prototype._is_fatal = function (error_condition) {
var non_fatal = this.get_option('non_fatal_errors', ['amqp:connection:forced']);
return non_fatal.indexOf(error_condition) < 0;
var all_errors_non_fatal = this.get_option('all_errors_non_fatal', false);
if (all_errors_non_fatal) {
return false;
} else {
var non_fatal = this.get_option('non_fatal_errors', ['amqp:connection:forced']);
return non_fatal.indexOf(error_condition) < 0;
}
};

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

types.Reader.prototype.read_constructor = function () {
types.Reader.prototype.read_constructor = function (descriptors) {
var code = this.read_typecode();
if (code === 0x00) {
var d = [];
d.push(this.read());
var c = this.read_constructor();
while (c.descriptor) {
d.push(c.descriptor);
c = this.read_constructor();
}
return {'typecode': c.typecode, 'descriptor': d.length === 1 ? d[0] : d};
if (descriptors === undefined) {
descriptors = [];
}
descriptors.push(this.read());
return this.read_constructor(descriptors);
} else {
return {'typecode': code};
if (descriptors === undefined) {
return {'typecode': code};
} else if (descriptors.length === 1) {
return {'typecode': code, 'descriptor': descriptors[0]};
} else {
return {'typecode': code, 'descriptor': descriptors[0], 'descriptors': descriptors};
}
}
};

Expand Down
2 changes: 1 addition & 1 deletion dist/rhea.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/rhea.min.js.map

Large diffs are not rendered by default.

0 comments on commit f363440

Please sign in to comment.