Skip to content
This repository has been archived by the owner on Apr 14, 2020. It is now read-only.

Client does not prompt to Stay on Page / Exit when Stopped #61

Open
7im- opened this issue Jun 2, 2014 · 2 comments
Open

Client does not prompt to Stay on Page / Exit when Stopped #61

7im- opened this issue Jun 2, 2014 · 2 comments

Comments

@7im-
Copy link

7im- commented Jun 2, 2014

When the client is running, closing the tab will prompt to finish the WU, or exit.

When in the middle of a work unit, and you press the Stop Folding button to pause the client, if you then close the tab, there is no prompt to finish, or exit. It just exits.

It should prompt always.

Reported on the forum: https://foldingforum.org/viewtopic.php?f=95&t=26419 by k1wi. I confirmed it does it as well.

@anand-bhat
Copy link
Contributor

Remove check for fah.paused before return at https://github.com/FoldingAtHome/fah-nacl-client/blob/master/js/main.js#L1329 ?

    window.onbeforeunload = function (e) {
        if (fah.paused || typeof fah.wu == 'undefined')
            return;
        //...

@jcoffland
Copy link
Member

It should then also check if the WU is expired. These units are so fast that they expire quickly. If it was paused 15 minutes ago there's a good chance that it WU was already reassigned. This is why I opted to allow people to easily discard this WU by pausing first. There's little cost to the science with these WU and it's best not to annoy the user.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants