Skip to content

Refactor how we initiate polling#1882

Merged
SessionHero01 merged 6 commits intorelease/1.31.0from
refactor-pollers
Feb 3, 2026
Merged

Refactor how we initiate polling#1882
SessionHero01 merged 6 commits intorelease/1.31.0from
refactor-pollers

Conversation

@SessionHero01
Copy link
Collaborator

This PR tries to simplify and unify how we control our pollers.

Previously we have three similar but different ways of controlling Poller, GroupPoller and OpenGroupPoller, each of them also has similar but different way to run periodically.

In this change, we'll have BasePoller where the periodic polling, manual polling is all handled and the subclasses just need to provide the implementation of doPollOnce.

): Int {
return successfulPollIntervalSeconds +
((numConsecutiveFailures - 1).coerceAtLeast(0) * successfulPollIntervalSeconds)
.coerceAtMost(maxRetryIntervalSeconds)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we coerce the overall value?

val delay = successfulPollIntervalSeconds * (numConsecutiveFailures + 1)
return delay.coerceAtMost(maxRetryIntervalSeconds)
    ```

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@SessionHero01 SessionHero01 merged commit 7f11824 into release/1.31.0 Feb 3, 2026
4 checks passed
@SessionHero01 SessionHero01 deleted the refactor-pollers branch February 3, 2026 05:02
SessionHero01 added a commit that referenced this pull request Feb 3, 2026
* Bump version number

* Fix snode pool retrieve failure (#1875)

* Update seed snode download mechanism (#1879)

* Fix : Manage members QA pt.4 (#1881)

* Send control message before exception

* Add sorting by accountId when showing new dialogs

* cleanup

* cleanup for readability

* Cleanups

* Refactor how we initiate polling (#1882)

---------

Co-authored-by: ThomasSession <thomas.r@getsession.org>
Co-authored-by: jbsession <jb@getsession.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants