Skip to content

Commit

Permalink
Fix shutdown when called from tray callback (#1691)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheElixZammuto authored Oct 4, 2023
1 parent 84f1048 commit cfd78b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/system_tray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,12 @@ namespace system_tray {
// If we're running in a service, return a special status to
// tell it to terminate too, otherwise it will just respawn us.
if (GetConsoleWindow() == NULL) {
lifetime::exit_sunshine(ERROR_SHUTDOWN_IN_PROGRESS, false);
lifetime::exit_sunshine(ERROR_SHUTDOWN_IN_PROGRESS, true);
return;
}
#endif

lifetime::exit_sunshine(0, false);
lifetime::exit_sunshine(0, true);
}

// Tray menu
Expand Down

0 comments on commit cfd78b5

Please sign in to comment.