问题
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