Open andrewryan1906 opened 4 years ago
Per the documentation, you are not really supposed to deinitialize or create a new pubnub instance. You should probably just use separate channels and a singleton service.
https://www.pubnub.com/docs/angular2-javascript/pubnub-javascript-sdk#inject-pubnub-angular2 https://angular.io/guide/singleton-services
I'm using PubNub in conjunction with AWS Step Functions to observe a step function during execution. I have two step functions; Step Function A and Step Function B.
When I run function A, everything works OK; I get all of the PubNub communications. However, when I run function B, I get nothing. This is the code I'm using inside of my step function poling service:
So, once I kick off a step function, I run the pubNub.init() method. The first time, it works fine; the second time, it won't reset/reinitialize the instance.
What am I doing wrong? How can I get the default pubNub instance to "reset," so I can use it with other channels/instances?