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

[Feature Request] Sync immediately after "long jump in time" #1123

Open
alexozer opened this Issue Oct 10, 2018 · 2 comments

Comments

2 participants
@alexozer

alexozer commented Oct 10, 2018

I'm using mailspring 1.4.2 on Arch Linux.

It would be nice if mailspring would immediately sync if it detects that a long period of time has elapsed. Specifically, if I suspend my laptop for the night and resume it in the morning, mailspring doesn't seem to sync immediately and I have to sync it manually, even though it's more than due to sync. I'm not exactly sure when it currently decides to sync in the background.

@bengotow

This comment has been minimized.

Show comment
Hide comment
@bengotow

bengotow Oct 16, 2018

Collaborator

Hey! This is interesting—we currently run a JavaScript timer that goes off every 30s to check whether the app is online (in OnlineStatusStore.es6), and if it fires "late" (eg, more than 30s has passed since the last invocation), we assume that the app has woken from sleep. That is supposed to trigger mailsync-bridge.es6::_onOnlineStatusChanged, which wakes the mailsync processes. I wonder if Linux is working slightly differently and the app is detecting wake-from-sleep but attempting to sync before it has an internet connection, failing, and then waiting 30s or 120s to try again.

I'll check and make sure this actually works on macOS and we can dig in a bit more to what's going on with Linux.

Collaborator

bengotow commented Oct 16, 2018

Hey! This is interesting—we currently run a JavaScript timer that goes off every 30s to check whether the app is online (in OnlineStatusStore.es6), and if it fires "late" (eg, more than 30s has passed since the last invocation), we assume that the app has woken from sleep. That is supposed to trigger mailsync-bridge.es6::_onOnlineStatusChanged, which wakes the mailsync processes. I wonder if Linux is working slightly differently and the app is detecting wake-from-sleep but attempting to sync before it has an internet connection, failing, and then waiting 30s or 120s to try again.

I'll check and make sure this actually works on macOS and we can dig in a bit more to what's going on with Linux.

@alexozer

This comment has been minimized.

Show comment
Hide comment
@alexozer

alexozer Oct 16, 2018

alexozer commented Oct 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment