Skip to content

Commit

Permalink
3.16.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Presman committed Dec 17, 2016
1 parent 41f4d37 commit 76be900
Show file tree
Hide file tree
Showing 21 changed files with 165 additions and 125 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.16.4
3.16.5
22 changes: 13 additions & 9 deletions core/src/pubnub-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,17 @@ function unique() {
var nextorigin = (function () {
var max = 20;
var ori = Math.floor(Math.random() * max);
return function (origin, failover) {
return origin.indexOf('pubsub.') > 0
&& origin.replace(
'pubsub', 'ps' + (
failover ? utils.generateUUID().split('-')[0] :
(++ori < max ? ori : ori = 1)
)) || origin;
return function (origin) {
var protocol = origin.split('://')[0];
var host = origin.split('://')[1];

if (host.match('^ps')) {
return protocol + '://' + host.replace('ps', 'ps' + (++ori < max ? ori : ori = 1));
} else if (host.match('^pubsub')) {
return protocol + '://' + host.replace('pubsub', 'ps' + (++ori < max ? ori : ori = 1));
} else {
return origin;
}
};
})();

Expand Down Expand Up @@ -1294,8 +1298,8 @@ function PN_API(setup) {
utils.timeout(CONNECT, windowing);
} else {
// New Origin on Failed Connection
STD_ORIGIN = nextorigin(ORIGIN, 1);
SUB_ORIGIN = nextorigin(ORIGIN, 1);
STD_ORIGIN = nextorigin(ORIGIN);
SUB_ORIGIN = nextorigin(ORIGIN);

// Re-test Connection
utils.timeout(function () {
Expand Down
26 changes: 15 additions & 11 deletions modern/dist/pubnub.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! 3.16.3 / modern */
/*! 3.16.5 / modern */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -455,13 +455,17 @@ return /******/ (function(modules) { // webpackBootstrap
var nextorigin = (function () {
var max = 20;
var ori = Math.floor(Math.random() * max);
return function (origin, failover) {
return origin.indexOf('pubsub.') > 0
&& origin.replace(
'pubsub', 'ps' + (
failover ? utils.generateUUID().split('-')[0] :
(++ori < max ? ori : ori = 1)
)) || origin;
return function (origin) {
var protocol = origin.split('://')[0];
var host = origin.split('://')[1];

if (host.match('^ps')) {
return protocol + '://' + host.replace('ps', 'ps' + (++ori < max ? ori : ori = 1));
} else if (host.match('^pubsub')) {
return protocol + '://' + host.replace('pubsub', 'ps' + (++ori < max ? ori : ori = 1));
} else {
return origin;
}
};
})();

Expand Down Expand Up @@ -1713,8 +1717,8 @@ return /******/ (function(modules) { // webpackBootstrap
utils.timeout(CONNECT, windowing);
} else {
// New Origin on Failed Connection
STD_ORIGIN = nextorigin(ORIGIN, 1);
SUB_ORIGIN = nextorigin(ORIGIN, 1);
STD_ORIGIN = nextorigin(ORIGIN);
SUB_ORIGIN = nextorigin(ORIGIN);

// Re-test Connection
utils.timeout(function () {
Expand Down Expand Up @@ -2472,7 +2476,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = {
"name": "pubnub",
"preferGlobal": false,
"version": "3.16.3",
"version": "3.16.5",
"author": "PubNub <support@pubnub.com>",
"description": "Publish & Subscribe Real-time Messaging with PubNub",
"contributors": [
Expand Down
4 changes: 2 additions & 2 deletions modern/dist/pubnub.min.js

Large diffs are not rendered by default.

26 changes: 15 additions & 11 deletions modern/pubnub.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! 3.16.3 / modern */
/*! 3.16.5 / modern */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -455,13 +455,17 @@ return /******/ (function(modules) { // webpackBootstrap
var nextorigin = (function () {
var max = 20;
var ori = Math.floor(Math.random() * max);
return function (origin, failover) {
return origin.indexOf('pubsub.') > 0
&& origin.replace(
'pubsub', 'ps' + (
failover ? utils.generateUUID().split('-')[0] :
(++ori < max ? ori : ori = 1)
)) || origin;
return function (origin) {
var protocol = origin.split('://')[0];
var host = origin.split('://')[1];

if (host.match('^ps')) {
return protocol + '://' + host.replace('ps', 'ps' + (++ori < max ? ori : ori = 1));
} else if (host.match('^pubsub')) {
return protocol + '://' + host.replace('pubsub', 'ps' + (++ori < max ? ori : ori = 1));
} else {
return origin;
}
};
})();

Expand Down Expand Up @@ -1713,8 +1717,8 @@ return /******/ (function(modules) { // webpackBootstrap
utils.timeout(CONNECT, windowing);
} else {
// New Origin on Failed Connection
STD_ORIGIN = nextorigin(ORIGIN, 1);
SUB_ORIGIN = nextorigin(ORIGIN, 1);
STD_ORIGIN = nextorigin(ORIGIN);
SUB_ORIGIN = nextorigin(ORIGIN);

// Re-test Connection
utils.timeout(function () {
Expand Down Expand Up @@ -2472,7 +2476,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = {
"name": "pubnub",
"preferGlobal": false,
"version": "3.16.3",
"version": "3.16.5",
"author": "PubNub <support@pubnub.com>",
"description": "Publish & Subscribe Real-time Messaging with PubNub",
"contributors": [
Expand Down
4 changes: 2 additions & 2 deletions modern/pubnub.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pubnub",
"preferGlobal": false,
"version": "3.16.4",
"version": "3.16.5",
"author": "PubNub <support@pubnub.com>",
"description": "Publish & Subscribe Real-time Messaging with PubNub",
"contributors": [
Expand Down
26 changes: 15 additions & 11 deletions parse/dist/pubnub.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! 3.16.3 / parse */
/*! 3.16.5 / parse */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("crypto"), require("buffer"));
Expand Down Expand Up @@ -318,13 +318,17 @@ return /******/ (function(modules) { // webpackBootstrap
var nextorigin = (function () {
var max = 20;
var ori = Math.floor(Math.random() * max);
return function (origin, failover) {
return origin.indexOf('pubsub.') > 0
&& origin.replace(
'pubsub', 'ps' + (
failover ? utils.generateUUID().split('-')[0] :
(++ori < max ? ori : ori = 1)
)) || origin;
return function (origin) {
var protocol = origin.split('://')[0];
var host = origin.split('://')[1];

if (host.match('^ps')) {
return protocol + '://' + host.replace('ps', 'ps' + (++ori < max ? ori : ori = 1));
} else if (host.match('^pubsub')) {
return protocol + '://' + host.replace('pubsub', 'ps' + (++ori < max ? ori : ori = 1));
} else {
return origin;
}
};
})();

Expand Down Expand Up @@ -1576,8 +1580,8 @@ return /******/ (function(modules) { // webpackBootstrap
utils.timeout(CONNECT, windowing);
} else {
// New Origin on Failed Connection
STD_ORIGIN = nextorigin(ORIGIN, 1);
SUB_ORIGIN = nextorigin(ORIGIN, 1);
STD_ORIGIN = nextorigin(ORIGIN);
SUB_ORIGIN = nextorigin(ORIGIN);

// Re-test Connection
utils.timeout(function () {
Expand Down Expand Up @@ -2335,7 +2339,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = {
"name": "pubnub",
"preferGlobal": false,
"version": "3.16.3",
"version": "3.16.5",
"author": "PubNub <support@pubnub.com>",
"description": "Publish & Subscribe Real-time Messaging with PubNub",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion parse/dist/pubnub.min.js

Large diffs are not rendered by default.

26 changes: 15 additions & 11 deletions phonegap/dist/pubnub.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! 3.16.3 / phonegap */
/*! 3.16.5 / phonegap */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -455,13 +455,17 @@ return /******/ (function(modules) { // webpackBootstrap
var nextorigin = (function () {
var max = 20;
var ori = Math.floor(Math.random() * max);
return function (origin, failover) {
return origin.indexOf('pubsub.') > 0
&& origin.replace(
'pubsub', 'ps' + (
failover ? utils.generateUUID().split('-')[0] :
(++ori < max ? ori : ori = 1)
)) || origin;
return function (origin) {
var protocol = origin.split('://')[0];
var host = origin.split('://')[1];

if (host.match('^ps')) {
return protocol + '://' + host.replace('ps', 'ps' + (++ori < max ? ori : ori = 1));
} else if (host.match('^pubsub')) {
return protocol + '://' + host.replace('pubsub', 'ps' + (++ori < max ? ori : ori = 1));
} else {
return origin;
}
};
})();

Expand Down Expand Up @@ -1713,8 +1717,8 @@ return /******/ (function(modules) { // webpackBootstrap
utils.timeout(CONNECT, windowing);
} else {
// New Origin on Failed Connection
STD_ORIGIN = nextorigin(ORIGIN, 1);
SUB_ORIGIN = nextorigin(ORIGIN, 1);
STD_ORIGIN = nextorigin(ORIGIN);
SUB_ORIGIN = nextorigin(ORIGIN);

// Re-test Connection
utils.timeout(function () {
Expand Down Expand Up @@ -2472,7 +2476,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = {
"name": "pubnub",
"preferGlobal": false,
"version": "3.16.3",
"version": "3.16.5",
"author": "PubNub <support@pubnub.com>",
"description": "Publish & Subscribe Real-time Messaging with PubNub",
"contributors": [
Expand Down
4 changes: 2 additions & 2 deletions phonegap/dist/pubnub.min.js

Large diffs are not rendered by default.

26 changes: 15 additions & 11 deletions sencha/dist/pubnub.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! 3.16.3 / sencha */
/*! 3.16.5 / sencha */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -455,13 +455,17 @@ return /******/ (function(modules) { // webpackBootstrap
var nextorigin = (function () {
var max = 20;
var ori = Math.floor(Math.random() * max);
return function (origin, failover) {
return origin.indexOf('pubsub.') > 0
&& origin.replace(
'pubsub', 'ps' + (
failover ? utils.generateUUID().split('-')[0] :
(++ori < max ? ori : ori = 1)
)) || origin;
return function (origin) {
var protocol = origin.split('://')[0];
var host = origin.split('://')[1];

if (host.match('^ps')) {
return protocol + '://' + host.replace('ps', 'ps' + (++ori < max ? ori : ori = 1));
} else if (host.match('^pubsub')) {
return protocol + '://' + host.replace('pubsub', 'ps' + (++ori < max ? ori : ori = 1));
} else {
return origin;
}
};
})();

Expand Down Expand Up @@ -1713,8 +1717,8 @@ return /******/ (function(modules) { // webpackBootstrap
utils.timeout(CONNECT, windowing);
} else {
// New Origin on Failed Connection
STD_ORIGIN = nextorigin(ORIGIN, 1);
SUB_ORIGIN = nextorigin(ORIGIN, 1);
STD_ORIGIN = nextorigin(ORIGIN);
SUB_ORIGIN = nextorigin(ORIGIN);

// Re-test Connection
utils.timeout(function () {
Expand Down Expand Up @@ -2472,7 +2476,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = {
"name": "pubnub",
"preferGlobal": false,
"version": "3.16.3",
"version": "3.16.5",
"author": "PubNub <support@pubnub.com>",
"description": "Publish & Subscribe Real-time Messaging with PubNub",
"contributors": [
Expand Down
4 changes: 2 additions & 2 deletions sencha/dist/pubnub.min.js

Large diffs are not rendered by default.

26 changes: 15 additions & 11 deletions titanium/dist/pubnub.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! 3.16.3 / titanium */
/*! 3.16.5 / titanium */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -551,13 +551,17 @@ return /******/ (function(modules) { // webpackBootstrap
var nextorigin = (function () {
var max = 20;
var ori = Math.floor(Math.random() * max);
return function (origin, failover) {
return origin.indexOf('pubsub.') > 0
&& origin.replace(
'pubsub', 'ps' + (
failover ? utils.generateUUID().split('-')[0] :
(++ori < max ? ori : ori = 1)
)) || origin;
return function (origin) {
var protocol = origin.split('://')[0];
var host = origin.split('://')[1];

if (host.match('^ps')) {
return protocol + '://' + host.replace('ps', 'ps' + (++ori < max ? ori : ori = 1));
} else if (host.match('^pubsub')) {
return protocol + '://' + host.replace('pubsub', 'ps' + (++ori < max ? ori : ori = 1));
} else {
return origin;
}
};
})();

Expand Down Expand Up @@ -1809,8 +1813,8 @@ return /******/ (function(modules) { // webpackBootstrap
utils.timeout(CONNECT, windowing);
} else {
// New Origin on Failed Connection
STD_ORIGIN = nextorigin(ORIGIN, 1);
SUB_ORIGIN = nextorigin(ORIGIN, 1);
STD_ORIGIN = nextorigin(ORIGIN);
SUB_ORIGIN = nextorigin(ORIGIN);

// Re-test Connection
utils.timeout(function () {
Expand Down Expand Up @@ -2568,7 +2572,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = {
"name": "pubnub",
"preferGlobal": false,
"version": "3.16.3",
"version": "3.16.5",
"author": "PubNub <support@pubnub.com>",
"description": "Publish & Subscribe Real-time Messaging with PubNub",
"contributors": [
Expand Down
4 changes: 2 additions & 2 deletions titanium/dist/pubnub.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 76be900

Please sign in to comment.