pubnub js reconnect not working for me

回眸只為那壹抹淺笑 提交于 2020-04-14 07:06:05

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/49517416/pubnub-js-reconnect-not-working-for-me

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!