Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take account of maximumDelay in LinearRetryPolicy #127

Closed
wants to merge 1 commit into from

Conversation

Ali-Toosi
Copy link

It appears that the linear retry policy is not being limited by the maximumDelay. This fixes it, following how exponential retry handles the maximum delay.

@Ali-Toosi
Copy link
Author

Ali-Toosi commented Nov 27, 2024

Given the subscribe call is not limited by the maxRetries (which I understand is the intended behaviour

if (diagnostic is TimeoutDiagnostic && fiber.isSubscribe) {
/// Maximum retries in non-subscribe calls.
) it would be great to fix this so the retry delay would be limited. Otherwise the delay could get infinitely long and once the connection is restored, the app has no way of telling it because the previous subscription is waiting and its waiting could take hours.
@are

mohitpubnub added a commit that referenced this pull request Dec 9, 2024
Fixed issue pointed out by PR #127 for limiting retry delay within maximum delay for linear policy
@mohitpubnub
Copy link
Contributor

@Ali-Toosi Thank you for your findings and efforts in creating this PR. We will be consolidating these changes into the upcoming release to ensure a more comprehensive changelog and to align with our release process. As merging this PR directly cause lack of changes information!

@mohitpubnub mohitpubnub added status: accepted This issue is accepted as valid, but it's not being worked on yet. type: bug This issue reports a bug. type: fix This PR contains fixes to existing features. labels Dec 9, 2024
@mohitpubnub mohitpubnub self-assigned this Dec 9, 2024
mohitpubnub added a commit that referenced this pull request Dec 10, 2024
* * `custom_message_type` support for subscription, publish, signal and files features.
* `custom_message_type` field parsing support in history apis.
* acceptance tests steps implementation for custom_message_type

* set default retry policy to `Exponential` with default configuration.
Fixed issue pointed out by PR #127 for limiting retry delay within maximum delay for linear policy

* fix: linting and warnings

* fix channel test for customMessageType

* PubNub SDK v5.0.0 release.

* update changelog

---------

Co-authored-by: PubNub Release Bot <[email protected]>
@Ali-Toosi Ali-Toosi closed this Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepted This issue is accepted as valid, but it's not being worked on yet. type: bug This issue reports a bug. type: fix This PR contains fixes to existing features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants