caliph
caliph

Reputation: 1439

pubnub js reconnect not working for me

I have a web chat client that is not reconnecting to pubnub when event PNNetworkUpCategory is detected.

SAChat.prototype.start = function() {
var _this = this;
this.pubnub.addListener({
    status: function (statusEvent) {
        if (statusEvent.category === "PNNetworkUpCategory") {
            console.log('PNNetworkUpCategory: SDK detected that network is online.' )
            _this.pubnub.reconnect();
...

Anybody any idea why the client is not appearing again in the channel?

Upvotes: 2

Views: 311

Answers (1)

Avi Ivgi
Avi Ivgi

Reputation: 69

I'd like to help you resolve this one :)

Few questions/requests, if I may:

  • SDK Version
  • Your PubNub Init config
  • Enable Log verbosity, and share the logs
  • Screenshot/s of any error
  • Code snippets

Looking forward to your answers.

Avi.

Upvotes: 2

Related Questions