Skip to content

Commit 94d7076

Browse files
mohitpubnubMohit Tejanipubnub-release-bot
authored
Fix/exponential retry policy (#499)
* fix: exponential retry policy delay calculation should always respect minimum configured delay * dist/lib updates * PubNub SDK v11.0.2 release. --------- Co-authored-by: Mohit Tejani <mohit.tejani@Mohits-MacBook-Pro.local> Co-authored-by: PubNub Release Bot <120067856+pubnub-release-bot@users.noreply.github.com>
1 parent 0ad7d97 commit 94d7076

11 files changed

Lines changed: 27 additions & 16 deletions

File tree

.pubnub.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
---
22
changelog:
3+
- date: 2026-06-11
4+
version: v11.0.2
5+
changes:
6+
- type: bug
7+
text: "Fix exponential retry policy delay calculation to respected minimum delay configured value."
38
- date: 2026-05-13
49
version: v11.0.1
510
changes:
@@ -1411,7 +1416,7 @@ supported-platforms:
14111416
- 'Ubuntu 14.04 and up'
14121417
- 'Windows 7 and up'
14131418
version: 'Pubnub Javascript for Node'
1414-
version: '11.0.1'
1419+
version: '11.0.2'
14151420
sdks:
14161421
- full-name: PubNub Javascript SDK
14171422
short-name: Javascript
@@ -1427,7 +1432,7 @@ sdks:
14271432
- distribution-type: source
14281433
distribution-repository: GitHub release
14291434
package-name: pubnub.js
1430-
location: https://github.com/pubnub/javascript/archive/refs/tags/v11.0.1.zip
1435+
location: https://github.com/pubnub/javascript/archive/refs/tags/v11.0.2.zip
14311436
requires:
14321437
- name: 'agentkeepalive'
14331438
min-version: '3.5.2'
@@ -2098,7 +2103,7 @@ sdks:
20982103
- distribution-type: library
20992104
distribution-repository: GitHub release
21002105
package-name: pubnub.js
2101-
location: https://github.com/pubnub/javascript/releases/download/v11.0.1/pubnub.11.0.1.js
2106+
location: https://github.com/pubnub/javascript/releases/download/v11.0.2/pubnub.11.0.2.js
21022107
requires:
21032108
- name: 'agentkeepalive'
21042109
min-version: '3.5.2'

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## v11.0.2
2+
June 11 2026
3+
4+
#### Fixed
5+
- Fix exponential retry policy delay calculation to respected minimum delay configured value.
6+
17
## v11.0.1
28
May 13 2026
39

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ Watch [Getting Started with PubNub JS SDK](https://app.dashcam.io/replay/64ee0d2
2727
npm install pubnub
2828
```
2929
* or download one of our builds from our CDN:
30-
* https://cdn.pubnub.com/sdk/javascript/pubnub.11.0.1.js
31-
* https://cdn.pubnub.com/sdk/javascript/pubnub.11.0.1.min.js
30+
* https://cdn.pubnub.com/sdk/javascript/pubnub.11.0.2.js
31+
* https://cdn.pubnub.com/sdk/javascript/pubnub.11.0.2.min.js
3232
3333
2. Configure your keys:
3434

dist/web/pubnub.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5009,7 +5009,7 @@
50095009
if (response && response.headers['retry-after'] !== undefined)
50105010
delay = parseInt(response.headers['retry-after'], 10);
50115011
if (delay === -1)
5012-
delay = Math.min(Math.pow(2, attempt), this.maximumDelay);
5012+
delay = Math.min(this.minimumDelay * Math.pow(2, attempt), this.maximumDelay);
50135013
return (delay + Math.random()) * 1000;
50145014
},
50155015
validate() {
@@ -5432,7 +5432,7 @@
54325432
return base.PubNubFile;
54335433
},
54345434
get version() {
5435-
return '11.0.1';
5435+
return '11.0.2';
54365436
},
54375437
getVersion() {
54385438
return this.version;

dist/web/pubnub.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/core/components/configuration.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ const makeConfiguration = (base, setupCryptoModule) => {
168168
return base.PubNubFile;
169169
},
170170
get version() {
171-
return '11.0.1';
171+
return '11.0.2';
172172
},
173173
getVersion() {
174174
return this.version;

lib/core/components/retry-policy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ class RetryPolicy {
171171
if (response && response.headers['retry-after'] !== undefined)
172172
delay = parseInt(response.headers['retry-after'], 10);
173173
if (delay === -1)
174-
delay = Math.min(Math.pow(2, attempt), this.maximumDelay);
174+
delay = Math.min(this.minimumDelay * Math.pow(2, attempt), this.maximumDelay);
175175
return (delay + Math.random()) * 1000;
176176
},
177177
validate() {

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pubnub",
3-
"version": "11.0.1",
3+
"version": "11.0.2",
44
"author": "PubNub <support@pubnub.com>",
55
"description": "Publish & Subscribe Real-time Messaging with PubNub",
66
"scripts": {

src/core/components/configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ export const makeConfiguration = (
236236
return base.PubNubFile;
237237
},
238238
get version(): string {
239-
return '11.0.1';
239+
return '11.0.2';
240240
},
241241
getVersion(): string {
242242
return this.version;

0 commit comments

Comments
 (0)