MCPcopy Create free account
hub / github.com/Gan-Xing/CodexBridge / stop

Function stop

src/cli.ts:278–292  ·  view source on GitHub ↗
(signal: string)

Source from the content-addressed store, hash-verified

276 serveLock.releaseSync();
277 });
278 const stop = async (signal: string) => {
279 if (stopped) {
280 return;
281 }
282 stopped = true;
283 process.stdout.write(`${i18n.t('cli.serve.stopping', { signal })}\n`);
284 try {
285 await bridgeRuntime.stop();
286 await nativeApi?.stop().catch(() => {});
287 } finally {
288 await stopRuntimeProviderPlugins(runtime.registry.listProviders());
289 await serveLock.release();
290 process.exit(0);
291 }
292 };
293
294 process.on('SIGINT', () => { void stop('SIGINT'); });
295 process.on('SIGTERM', () => { void stop('SIGTERM'); });

Callers 2

runWeixinServeFunction · 0.70
runCodexNativeApiServeFunction · 0.70

Calls 6

writeMethod · 0.80
listProvidersMethod · 0.80
releaseMethod · 0.80
tMethod · 0.65
stopMethod · 0.65

Tested by

no test coverage detected