Skip to content

Abort sync if connection is lost - #562

Merged
TheOneRing merged 6 commits into
mainfrom
work/abort_on_disco
Sep 30, 2025
Merged

TheOneRing merged 6 commits into
mainfrom
work/abort_on_disco

Conversation

@TheOneRing

Copy link
Copy Markdown
Contributor

Fixes: #492

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements connection loss handling to abort synchronization when network connectivity is lost. The changes remove the freshConnectionAttempt() method and replace it with direct calls to checkConnectivity(), while also improving state change detection and conditional logic for folder synchronization.

  • Removes deprecated freshConnectionAttempt() method and related typedef for cleaner API
  • Improves state change detection in setState() method using a dedicated boolean flag
  • Adds specific state checks for disconnected/signed-out accounts in folder synchronization logic

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/gui/networksettings.cpp Replaces freshConnectionAttempt() call with checkConnectivity(true)
src/gui/folderman.cpp Adds specific state condition for disconnected/signed-out accounts
src/gui/accountstate.h Removes typedef and method declaration, changes enum type to uint8_t
src/gui/accountstate.cpp Removes method implementation and improves state change logic

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/gui/folderman.cpp Resolved
Comment thread src/gui/accountstate.cpp Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/gui/scheduling/syncscheduler.cpp Resolved
Comment thread src/gui/folder.cpp Resolved
@TheOneRing
TheOneRing merged commit ec6366e into main Sep 30, 2025
@TheOneRing
TheOneRing deleted the work/abort_on_disco branch September 30, 2025 12:47
@openclouders openclouders mentioned this pull request Sep 29, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Signing out should stop the local discovery

2 participants