MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / stopHttpServer

Function stopHttpServer

apps/cli/src/http/index.ts:250–269  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

248 * 停止 HTTP API 服务
249 */
250export async function stopHttpServer(): Promise<void> {
251 if (!server) return
252
253 try {
254 await server.close()
255 } finally {
256 cleanupSync()
257 if (aiChatManager) {
258 aiChatManager.close()
259 aiChatManager = null
260 }
261 if (dbManager) {
262 dbManager.closeAll()
263 dbManager = null
264 }
265 closeServerAiLogger()
266 setRequireAuth(false)
267 server = null
268 }
269}
270
271export { createServer } from './server'
272export { registerWebRoutes } from './routes/web'

Callers 2

shutdownFunction · 0.85

Calls 5

cleanupSyncFunction · 0.90
closeServerAiLoggerFunction · 0.90
setRequireAuthFunction · 0.90
closeAllMethod · 0.80
closeMethod · 0.65

Tested by

no test coverage detected