comprodls-sdk 2.76.0 → 2.76.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/comprodls-sdk.js
CHANGED
|
@@ -13090,8 +13090,7 @@ module.exports = function () {
|
|
|
13090
13090
|
if(!_globalSubscription.includes(pubNubChannel)) {
|
|
13091
13091
|
_globalSubscription.push(pubNubChannel);
|
|
13092
13092
|
_globalSubscriptionStatus[pubNubChannel] = {
|
|
13093
|
-
status: 'pending'
|
|
13094
|
-
pushedEventIdentifier: pubNubChannel.split('.*')[0]
|
|
13093
|
+
status: 'pending'
|
|
13095
13094
|
};
|
|
13096
13095
|
_eventEmitter.on(pubNubChannel, handler);
|
|
13097
13096
|
_subscribeToPubNubChannels(pubNubChannel);
|
|
@@ -13114,6 +13113,10 @@ module.exports = function () {
|
|
|
13114
13113
|
|
|
13115
13114
|
var _translatePubnubStatus = function(status, options) {
|
|
13116
13115
|
var channels = [], error, successObj;
|
|
13116
|
+
|
|
13117
|
+
// If polling has been initiated, ignore all punnub status
|
|
13118
|
+
if (bPollingInitiated) return;
|
|
13119
|
+
|
|
13117
13120
|
switch (status.category) {
|
|
13118
13121
|
case "PNConnectedCategory":
|
|
13119
13122
|
if(status.operation === "PNSubscribeOperation") {
|
|
@@ -13140,7 +13143,6 @@ module.exports = function () {
|
|
|
13140
13143
|
}
|
|
13141
13144
|
break;
|
|
13142
13145
|
case "PNAccessDeniedCategory":
|
|
13143
|
-
if(bPollingInitiated) break;
|
|
13144
13146
|
if(status.operation === "PNSubscribeOperation") {
|
|
13145
13147
|
var errorData = {
|
|
13146
13148
|
payload: JSON.parse(status.errorData.response.text).payload,
|
|
@@ -13165,7 +13167,6 @@ module.exports = function () {
|
|
|
13165
13167
|
case "PNBadRequestCategory":
|
|
13166
13168
|
case "PNNetworkDownCategory":
|
|
13167
13169
|
case "PNNetworkUpCategory":
|
|
13168
|
-
if(bPollingInitiated) break;
|
|
13169
13170
|
error = {
|
|
13170
13171
|
message: "PushX Error", status: status.statusCode,
|
|
13171
13172
|
pushXError: status
|
|
@@ -13204,7 +13205,6 @@ module.exports = function () {
|
|
|
13204
13205
|
// Handle reconnected category status.
|
|
13205
13206
|
break;
|
|
13206
13207
|
default:
|
|
13207
|
-
if(bPollingInitiated) break;
|
|
13208
13208
|
// Emit error for other status-category received from pubnub
|
|
13209
13209
|
error = {
|
|
13210
13210
|
message: "PushX Error",
|
|
@@ -13282,6 +13282,7 @@ module.exports = function () {
|
|
|
13282
13282
|
_globalSubscription = [];
|
|
13283
13283
|
bStatusSubscribed = false;
|
|
13284
13284
|
_globalSubscriptionStatus = {};
|
|
13285
|
+
bPollingInitiated = false;
|
|
13285
13286
|
}
|
|
13286
13287
|
_pubnubClient = undefined;
|
|
13287
13288
|
};
|