Skip to content

Commit

Permalink
fix: close client app before checking ping response
Browse files Browse the repository at this point in the history
  • Loading branch information
dessant committed Mar 3, 2019
1 parent e17107f commit 715aab7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ async function pingClientApp({
message: {command: 'ping'}
});

if (checkResponse && (!rsp.success || rsp.data !== 'pong')) {
throw new Error(`Client app response: ${rsp.data}`);
}

if (stop) {
await browser.runtime.sendMessage({id: 'stopClientApp'});
}

if (checkResponse && (!rsp.success || rsp.data !== 'pong')) {
throw new Error(`Client app response: ${rsp.data}`);
}

return rsp;
}

Expand Down

0 comments on commit 715aab7

Please sign in to comment.