diff --git a/@overflow/discovery/subscriber/discovery.subscriber.ts b/@overflow/discovery/subscriber/discovery.subscriber.ts index e2fd39a..08d2abf 100644 --- a/@overflow/discovery/subscriber/discovery.subscriber.ts +++ b/@overflow/discovery/subscriber/discovery.subscriber.ts @@ -27,13 +27,10 @@ export class DiscoverySubscriber { public constructor( private loggerService: LoggerService, ) { - this.discoverySubscriberSubject = null; + this.discoverySubscriberSubject = new DiscoverySubscriberSubject(); } public observable(): Observable { - if (null === this.discoverySubscriberSubject) { - this.discoverySubscriberSubject = new DiscoverySubscriberSubject(); - } return this.discoverySubscriberSubject.asObservable(); } diff --git a/@overflow/noauth-probe/subscriber/noauth-probe.subscriber.ts b/@overflow/noauth-probe/subscriber/noauth-probe.subscriber.ts index 3226845..6b68937 100644 --- a/@overflow/noauth-probe/subscriber/noauth-probe.subscriber.ts +++ b/@overflow/noauth-probe/subscriber/noauth-probe.subscriber.ts @@ -23,13 +23,10 @@ export class NoAuthProbeSubscriber { public constructor( private loggerService: LoggerService, ) { - this.noAuthProbeSubscriberSubject = null; + this.noAuthProbeSubscriberSubject = new NoAuthProbeSubscriberSubject(); } public observable(): Observable { - if (null === this.noAuthProbeSubscriberSubject) { - this.noAuthProbeSubscriberSubject = new NoAuthProbeSubscriberSubject(); - } return this.noAuthProbeSubscriberSubject.asObservable(); } @@ -37,14 +34,14 @@ export class NoAuthProbeSubscriber { this.noAuthProbeSubscriberSubject.next({ method: method, params: params }); } - @RPCSubscriber({method: 'NoAuthProbeService.onConnect'}) + @RPCSubscriber({ method: 'NoAuthProbeService.onConnect' }) public onConnect(noAuthProbe: NoAuthProbe): void { this.loggerService.debug('NoAuthProbeService.onConnect noAuthProbe:', noAuthProbe); this.publish('NoAuthProbeService.onConnect', noAuthProbe); } - @RPCSubscriber({method: 'NoAuthProbeService.onDisconnect'}) + @RPCSubscriber({ method: 'NoAuthProbeService.onDisconnect' }) public onDisconnect(noAuthProbe: NoAuthProbe): void { this.loggerService.debug('NoAuthProbeService.onDisconnect noAuthProbe:', noAuthProbe); diff --git a/@overflow/probe/subscriber/probe.subscriber.ts b/@overflow/probe/subscriber/probe.subscriber.ts index 44f580a..de15dae 100644 --- a/@overflow/probe/subscriber/probe.subscriber.ts +++ b/@overflow/probe/subscriber/probe.subscriber.ts @@ -23,13 +23,10 @@ export class ProbeSubscriber { public constructor( private loggerService: LoggerService, ) { - this.probeSubscriberSubject = null; + this.probeSubscriberSubject = new ProbeSubscriberSubject(); } public observable(): Observable { - if (null === this.probeSubscriberSubject) { - this.probeSubscriberSubject = new ProbeSubscriberSubject(); - } return this.probeSubscriberSubject.asObservable(); } @@ -37,14 +34,14 @@ export class ProbeSubscriber { this.probeSubscriberSubject.next({ method: method, params: params }); } - @RPCSubscriber({method: 'ProbeService.onConnect'}) + @RPCSubscriber({ method: 'ProbeService.onConnect' }) public onConnect(probe: Probe): void { this.loggerService.debug('ProbeService.onConnect probe:', probe); this.publish('ProbeService.onConnect', probe); } - @RPCSubscriber({method: 'ProbeService.onDisconnect'}) + @RPCSubscriber({ method: 'ProbeService.onDisconnect' }) public onDisconnect(probe: Probe): void { this.loggerService.debug('ProbeService.onDisconnect noAuthProbe:', probe);