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

sleep one second before websocket reconnect #4194

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

mahibi
Copy link
Collaborator

@mahibi mahibi commented Sep 11, 2024

otherwise it's an endless loop without delay which may stress the devices...

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

otherwise it's an endless loop without delay which may stress the devices...

Signed-off-by: Marcel Hibbe <[email protected]>
@mahibi mahibi added the 3. to review Waiting for reviews label Sep 11, 2024
@mahibi mahibi added this to the 20.1.0 milestone Sep 11, 2024
@mahibi mahibi self-assigned this Sep 11, 2024
@mahibi
Copy link
Collaborator Author

mahibi commented Sep 11, 2024

/backport to stable-20.0

@SystemKeeper
Copy link

otherwise it's an endless loop

Which would raise the question if there should be an error at some point? But yes, we are doing something similar in ios and increase the timeout up to a certain threshold:
https://github.com/nextcloud/talk-ios/blob/83bed85d475e2c38fb63db1caa3eb4e040fcb2ce/NextcloudTalk/NCExternalSignalingController.m#L225-L239

Copy link
Contributor

Codacy

Lint

TypemasterPR
Warnings8692
Errors131131

SpotBugs

CategoryBaseNew
Bad practice66
Correctness1111
Dodgy code7878
Internationalization33
Malicious code vulnerability33
Performance66
Security11
Total108108

Lint increased!

Copy link
Contributor

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/4194-talk.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.

@mahibi
Copy link
Collaborator Author

mahibi commented Sep 12, 2024

otherwise it's an endless loop

Which would raise the question if there should be an error at some point? But yes, we are doing something similar in ios and increase the timeout up to a certain threshold: https://github.com/nextcloud/talk-ios/blob/83bed85d475e2c38fb63db1caa3eb4e040fcb2ce/NextcloudTalk/NCExternalSignalingController.m#L225-L239

If internet connection itself is lost then the user is informed. You suggest to still inform about if the websocket reconnect fails (maybe also for other reasons than lost internet?).

Increase the timeout will also be done 👍

@mahibi mahibi merged commit 50c9cfd into master Sep 12, 2024
17 of 19 checks passed
@mahibi mahibi deleted the bugfix/noid/delayWebsocketReconnect branch September 12, 2024 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants