Skip to content

Commit

Permalink
Added publish to get rid of connect error in refCount.js.
Browse files Browse the repository at this point in the history
  • Loading branch information
sclausen committed Apr 18, 2018
1 parent e0e4da5 commit 75a01e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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": "5.3.0",
"version": "5.4.0",
"description": "ngx mqtt client library",
"main": "bundles/ngx-mqtt.min.js",
"module": "./src/index.js",
Expand Down
3 changes: 2 additions & 1 deletion src/mqtt.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { UsingObservable } from 'rxjs/observable/UsingObservable';
import { Subject } from 'rxjs/Subject';
import { Subscription, AnonymousSubscription } from 'rxjs/Subscription';
import { merge } from 'rxjs/observable/merge';
import { filter, refCount } from 'rxjs/operators';
import { filter, publish, refCount } from 'rxjs/operators';

import {
IMqttClient,
Expand Down Expand Up @@ -163,6 +163,7 @@ export class MqttService {
(subscription: AnonymousSubscription) => merge(rejected, this.messages))
.pipe(
filter((msg: IMqttMessage) => MqttService.filterMatchesTopic(filterString, msg.topic)),
publish(),
refCount()
);
}
Expand Down

0 comments on commit 75a01e7

Please sign in to comment.