Skip to content

Commit

Permalink
PR updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bretambrose committed Aug 26, 2024
1 parent 0cd4daa commit e14deae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/browser/mqtt_request_response/protocol_adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,8 @@ export class ProtocolClientAdapter extends BufferedEventEmitter {

private static isUnsubackReasonCodeRetryable(reasonCode: mqtt5.UnsubackReasonCode) : boolean {
switch (reasonCode) {
case mqtt5.UnsubackReasonCode.UnspecifiedError:
case mqtt5.UnsubackReasonCode.ImplementationSpecificError:
case mqtt5.UnsubackReasonCode.PacketIdentifierInUse:
return true;

default:
Expand All @@ -472,7 +472,6 @@ export class ProtocolClientAdapter extends BufferedEventEmitter {

private static isSubackReasonCodeRetryable(reasonCode: mqtt5.SubackReasonCode) : boolean {
switch (reasonCode) {
case mqtt5.SubackReasonCode.UnspecifiedError:
case mqtt5.SubackReasonCode.PacketIdentifierInUse:
case mqtt5.SubackReasonCode.ImplementationSpecificError:
case mqtt5.SubackReasonCode.QuotaExceeded:
Expand Down
2 changes: 1 addition & 1 deletion lib/browser/mqtt_request_response/subscription_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ export class SubscriptionManager extends BufferedEventEmitter {
record.status = SubscriptionStatus.Subscribed;
this.emitEvents(record, SubscriptionEventType.StreamingSubscriptionEstablished);
} else {
if (event.retryable) {
if (event.retryable && !this.closed) {
this.activateSubscription(record);
} else {
record.poisoned = true;
Expand Down

0 comments on commit e14deae

Please sign in to comment.