Skip to content

Commit 949176a

Browse files
committed
Don't auto-shutdown on Mac to fit UX conventions
1 parent b1ca495 commit 949176a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ function manageBackgroundServices(
131131
// for 10 minutes, the server shuts down automatically. Skipped for dev, where that might be OK.
132132
// This should catch even hard desktop shell crashes, as sessions shut down automatically if the
133133
// client websocket becomes non-responsive.
134-
if (activeSessions <= 0 && IS_PROD_BUILD) {
134+
// We skip this on Mac, where apps don't generally close when the last window closes.
135+
if (activeSessions <= 0 && IS_PROD_BUILD && process.platform !== 'darwin') {
135136
if (shutdownTimer) {
136137
clearTimeout(shutdownTimer);
137138
shutdownTimer = undefined;

0 commit comments

Comments
 (0)