Skip to content

Conversation

@Rozerxshashank
Copy link

@Rozerxshashank Rozerxshashank commented Jan 29, 2026

When the app returns from background or the network reconnects after failures, the event polling may be stuck in a backoff wait.This causes users to see a loading indicator even though connectivity has been restored.

This PR aborts the backoff wait when:

  • The app resumes from background using AppLifecycleListener
  • Network connectivity is restored using connectivity_plus

Testing done:

1.Turn off wifi and turn on. ==> connects immediately
2.Aeroplane mode on then off. ==> connects immediatelyy after wifi reconnects
3.Go to Home screen and return to the App within 4 second(3999ms) app remains already connected.
4.Go to Home screen and open the app after 4 second(3999ms) the app connects immediately. (backoff aborted)
5.Lock screen (not possible with screen recording on physical device) but same as the test done on Home screen.(backoff aborted.)
The testing-

zulip-test.mp4

Fixes: #1884

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.

Stop sleep-induced backoff upon waking

1 participant