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

reinitialize sync engine after three failed trials #283

Merged
merged 1 commit into from
Dec 12, 2018

Conversation

norbusan
Copy link
Collaborator

after extended suspend, or bad connection, the connection to OD might
go stale. In this case, no connection works out and currently we get

  Syncing changes from OneDrive ...
  Retrial sync count: 1: Failure when receiving data from the peer on handle 56409DBD3960
  Syncing changes from OneDrive ...
  Retrial sync count: 2: Failure when receiving data from the peer on handle 56409DBD3960
  Syncing changes from OneDrive ...
  No network connection to Microsoft OneDrive Service, skipping sync

and this continues ad infinitum. Change the last action to re-initialize
the sync engine. With this change we get the following events (tested by
blocking onedrive via iptables):

  Dec 11 13:06:55 Syncing changes from OneDrive ...
  Dec 11 13:07:50 Syncing changes from OneDrive ...
  Dec 11 13:12:50 Retrial sync count: 1: Timeout was reached on handle 556C7172EA60
  Dec 11 13:12:50 Syncing changes from OneDrive ...
  Dec 11 13:12:59 Retrial sync count: 2: Couldn't connect to server on handle 556C7172EA60
  Dec 11 13:12:59 Syncing changes from OneDrive ...
  Dec 11 13:13:08 Giving up on sync after three trials: Couldn't connect to server on handle 556C7172EA60
  Dec 11 13:13:08 Pesistent connection errors, reinitializing connection
  Dec 11 13:14:01 Cannot initialize connection to OneDrive
  Dec 11 13:14:55 Cannot initialize connection to OneDrive
  Dec 11 13:15:42 Syncing changes from OneDrive ...
  Dec 11 13:16:38 Syncing changes from OneDrive ...

(iptables rules removed at 13:15:15)

@abraunegg
Copy link
Owner

abraunegg commented Dec 11, 2018

Looks good to me - and makes the application more robust when there is a flaky Internet connection - thanks

We just need to update the log message output otherwise this is good to merge

src/main.d Outdated Show resolved Hide resolved
src/main.d Outdated Show resolved Hide resolved
Copy link
Owner

@abraunegg abraunegg left a comment

Choose a reason for hiding this comment

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

The output messaging needs to be slightly tweaked, otherwise good to go.

after extended suspend, or bad connection, the connection to OD might
go stale. In this case, no connection works out and currently we get
  Syncing changes from OneDrive ...
  Retrial sync count: 1: Failure when receiving data from the peer on handle 56409DBD3960
  Syncing changes from OneDrive ...
  Retrial sync count: 2: Failure when receiving data from the peer on handle 56409DBD3960
  Syncing changes from OneDrive ...
  No network connection to Microsoft OneDrive Service, skipping sync
and this continues ad infinitum. Change the last action to re-initialize
the sync engine. With this change we get the following events (tested by
blocking onedrive via iptables):
  Dec 11 13:06:55 Syncing changes from OneDrive ...
  Dec 11 13:07:50 Syncing changes from OneDrive ...
  Dec 11 13:12:50 Retrial sync count: 1: Timeout was reached on handle 556C7172EA60
  Dec 11 13:12:50 Syncing changes from OneDrive ...
  Dec 11 13:12:59 Retrial sync count: 2: Couldn't connect to server on handle 556C7172EA60
  Dec 11 13:12:59 Syncing changes from OneDrive ...
  Dec 11 13:13:08 Giving up on sync after three trials: Couldn't connect to server on handle 556C7172EA60
  Dec 11 13:13:08 Pesistent connection errors, reinitializing connection
  Dec 11 13:14:01 Cannot initialize connection to OneDrive
  Dec 11 13:14:55 Cannot initialize connection to OneDrive
  Dec 11 13:15:42 Syncing changes from OneDrive ...
  Dec 11 13:16:38 Syncing changes from OneDrive ...
(iptables rules removed at 13:15:15)
@norbusan norbusan force-pushed the norbert/reinit-outdated-handle branch from 9ac3ae5 to 65131e6 Compare December 12, 2018 01:28
@norbusan
Copy link
Collaborator Author

Thanks, changed the commit to use the new log message and pushed out. I cannot approve the changes, so please do that and merge. Thanks a lot.

@abraunegg abraunegg merged commit 91aaf91 into master Dec 12, 2018
@norbusan
Copy link
Collaborator Author

Thanks!

@norbusan norbusan deleted the norbert/reinit-outdated-handle branch December 13, 2018 06:16
@lorenzosu lorenzosu mentioned this pull request Dec 13, 2018
3 tasks
@lock
Copy link

lock bot commented Jan 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Jan 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants