MCPcopy Create free account
hub / github.com/agent-tower/core / restartServer

Function restartServer

packages/server/scripts/dev.mjs:178–198  ·  view source on GitHub ↗
(changedPath)

Source from the content-addressed store, hash-verified

176 });
177}
178
179function restartServer(changedPath) {
180 restartInProgress = true;
181 const label = path.relative(packageRoot, changedPath) || changedPath;
182 log(`restarting due to ${label}`);
183
184 if (!child) {
185 startServer();
186 restartInProgress = false;
187 return;
188 }
189
190 const childToRestart = child;
191 restartAfterExit = true;
192 void stopBackendAndWait(childToRestart);
193}
194
195function shutdown(signal) {
196 if (shuttingDown) {
197 return;
198 }
199
200 shuttingDown = true;
201

Callers 1

scheduleRestartFunction · 0.85

Calls 3

startServerFunction · 0.85
logFunction · 0.70
killMethod · 0.65

Tested by

no test coverage detected