Skip to content

Commit bfda741

Browse files
committed
Fix daemon cleanup and remove unused export
- Add allowLiveOwner flag to forceStopDaemon cleanup to ensure socket removal even if process is slow to die - Remove unused getWorkspaceKey export from socket-path.ts
1 parent 829b538 commit bfda741

2 files changed

Lines changed: 1 addition & 9 deletions

File tree

src/cli/daemon-control.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export async function forceStopDaemon(socketPath: string): Promise<void> {
5454
cleanupWorkspaceDaemonFiles(entry.workspaceKey, {
5555
pid: entry.pid,
5656
socketPath,
57+
allowLiveOwner: true,
5758
});
5859
} else {
5960
// Registry entry missing; cannot derive workspace key from socket path alone.

src/daemon/socket-path.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,6 @@ export function getSocketPath(opts?: GetSocketPathOptions): string {
6565
return socketPathForWorkspaceRoot(workspaceRoot);
6666
}
6767

68-
export function getWorkspaceKey(opts?: GetSocketPathOptions): string {
69-
const cwd = opts?.cwd ?? process.cwd();
70-
const workspaceRoot = resolveWorkspaceRoot({
71-
cwd,
72-
projectConfigPath: opts?.projectConfigPath,
73-
});
74-
return workspaceKeyForRoot(workspaceRoot);
75-
}
76-
7768
export function ensureSocketDir(socketPath: string): void {
7869
const dir = dirname(socketPath);
7970
if (!existsSync(dir)) {

0 commit comments

Comments
 (0)