Skip to content

Commit

Permalink
Fixed indentation and created new version for #86.
Browse files Browse the repository at this point in the history
  • Loading branch information
sclausen committed May 8, 2018
1 parent 83b59ed commit 625ae76
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-mqtt",
"version": "6.1.0",
"version": "6.1.1",
"description": "ngx mqtt client library",
"main": "bundles/ngx-mqtt.min.js",
"module": "./src/index.js",
Expand Down
18 changes: 9 additions & 9 deletions src/mqtt.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ export class MqttService {
() => {
const subscription: Subscription = new Subscription();
this.client.subscribe(filterString, (err, granted: ISubscriptionGrant[]) => {
if(granted) { // granted can be undefined when an error occurs when the client is disconnecting
granted.forEach((granted_: ISubscriptionGrant) => {
if (granted_.qos === 128) {
delete this.observables[granted_.topic];
this.client.unsubscribe(granted_.topic);
rejected.error(`subscription for '${granted_.topic}' rejected!`);
}
this._onSuback.emit({filter: filterString, granted: granted_.qos !== 128});
});
if (granted) { // granted can be undefined when an error occurs when the client is disconnecting
granted.forEach((granted_: ISubscriptionGrant) => {
if (granted_.qos === 128) {
delete this.observables[granted_.topic];
this.client.unsubscribe(granted_.topic);
rejected.error(`subscription for '${granted_.topic}' rejected!`);
}
this._onSuback.emit({filter: filterString, granted: granted_.qos !== 128});
});
}
});
subscription.add(() => {
Expand Down

0 comments on commit 625ae76

Please sign in to comment.