Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(ssh): preserve external runtime ownership #5751

Closedmikeyperes(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/5751/headopened View on GitHub

Showing 6 changed files with 187 additions and 7 deletions (loading 4).

x
0 of 6 viewed, 6 left
13 additions and 7 deletionsapps/server/src/server.tsModified
View file
@@ -104,7 +104,7 @@
import * as UsageService from "./usage/UsageService.ts";
import { OrchestrationLayerLive } from "./orchestration/runtimeLayer.ts";
import {
- clearPersistedServerRuntimeState,
+ clearPersistedServerRuntimeStateIfOwned,
makePersistedServerRuntimeState,
persistServerRuntimeState,
} from "./serverRuntimeState.ts";
@@ -496,13 +496,19 @@
Effect.logWarning("Failed to persist server runtime state", { cause }),
+ return state;
}),
- () =>
- clearPersistedServerRuntimeState(config.serverRuntimeStatePath).pipe(
- Effect.catchCause((cause) =>
- Effect.logWarning("Failed to clear server runtime state", { cause }),
- ),
- ),
+ (state) =>
+ state === undefined
+ ? Effect.void
+ : clearPersistedServerRuntimeStateIfOwned({
+ path: config.serverRuntimeStatePath,
+ state,
+ }).pipe(
+ Effect.catchCause((cause) =>