MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / handleRestart

Function handleRestart

src/cli/commands/daemon.ts:222–244  ·  view source on GitHub ↗
(
  client: DaemonClient,
  socketPath: string,
  workspaceRoot: string,
  foreground: boolean,
  logOpts: { logPath?: string; logLevel?: string },
)

Source from the content-addressed store, hash-verified

220}
221
222async function handleRestart(
223 client: DaemonClient,
224 socketPath: string,
225 workspaceRoot: string,
226 foreground: boolean,
227 logOpts: { logPath?: string; logLevel?: string },
228): Promise<void> {
229 // Try to stop existing daemon
230 try {
231 const isRunning = await client.isRunning();
232 if (isRunning) {
233 writeLine('Stopping existing daemon...');
234 await client.stop();
235 // Wait for it to fully stop
236 await new Promise((resolve) => setTimeout(resolve, 500));
237 }
238 } catch {
239 // Ignore errors during stop
240 }
241
242 // Start new daemon
243 await handleStart(socketPath, workspaceRoot, foreground, logOpts);
244}
245
246interface DaemonListEntry {
247 workspaceKey: string;

Callers 1

registerDaemonCommandsFunction · 0.85

Calls 4

handleStartFunction · 0.85
isRunningMethod · 0.80
writeLineFunction · 0.70
stopMethod · 0.65

Tested by

no test coverage detected