Skip to content

Commit

Permalink
fix: wait for client app to close before launching new version
Browse files Browse the repository at this point in the history
  • Loading branch information
dessant committed Mar 4, 2019
1 parent aebd114 commit d9aef00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@
},

"info_updatingClientApp": {
"message": "Updating client app. This will take a moment.",
"message": "Updating client app. Solving will continue in a moment, do not switch away from the current tab.",
"description": "Info message."
},

Expand Down
4 changes: 3 additions & 1 deletion src/solve/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import {
getText,
waitForElement,
arrayBufferToBase64,
getRandomFloat
getRandomFloat,
sleep
} from 'utils/common';
import {
captchaGoogleSpeechApiLangCodes,
Expand Down Expand Up @@ -655,6 +656,7 @@ async function runSolver(ev) {

if (rsp.success) {
await browser.runtime.sendMessage({id: 'stopClientApp'});
await sleep(10000);

await pingClientApp({stop: false});

Expand Down

0 comments on commit d9aef00

Please sign in to comment.