Skip to content

Commit

Permalink
More robust stopping of background task
Browse files Browse the repository at this point in the history
  • Loading branch information
dacoaster committed Feb 1, 2023
1 parent 7ec204b commit 207f85d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const isDevelopment = process.env.NODE_ENV !== "production";
const browserUtility = require("./modules/BrowserWindowUtility");
const databaseUtility = require("./modules/DatabaseUtility");
const windowUtility = require("./modules/WindowUtility");
const serverUtility = require("./modules/ServerUtility");

require("./modules/IpcHandlers");

Expand Down Expand Up @@ -46,6 +47,8 @@ async function createWindow() {

// Quit when all windows are closed.
app.on("window-all-closed", () => {
serverUtility.stopServer();

// On macOS it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== "darwin") {
Expand Down
4 changes: 4 additions & 0 deletions src/components/authentication/SigninWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ export default {
},
methods: {
back: function () {
window.ipc.invoke(IPC_HANDLERS.SERVER, {
func: IPC_FUNCTIONS.STOP_SERVER,
});
this.$router.back();
},
async callJiraAPI() {
Expand Down

0 comments on commit 207f85d

Please sign in to comment.