diff --git a/lib/server/start.js b/lib/server/start.js index 4a85b66..bfe4fd6 100644 --- a/lib/server/start.js +++ b/lib/server/start.js @@ -23,7 +23,6 @@ const koa_mount_1 = tslib_1.__importDefault(require("koa-mount")); const chalk_1 = tslib_1.__importDefault(require("chalk")); const utils_1 = require("../utils"); const bcryptjs_1 = tslib_1.__importDefault(require("bcryptjs")); -const polyfill_1 = require("./polyfill"); (0, utils_1.checkNodeVersion)(); const socketAdminUI = (0, path_1.join)(__dirname, '../../ui/socket-admin'); const DATA_SUBSCRIBE_NAMESPACE = '/dsn'; @@ -173,7 +172,7 @@ async function startup(path, connector, omitWatchers, omitTimers, routine) { if (routine) { // 如果传入了routine,执行完成后就结束 const result = await appLoader.execRoutine(routine); - await appLoader.unmount(); + // await appLoader.unmount(); // 不卸载,在进程退出时会自动卸载 return result; } // if (errorHandler && typeof errorHandler === 'function') { @@ -449,7 +448,6 @@ async function startup(path, connector, omitWatchers, omitTimers, routine) { await koa.removeAllListeners(); await appLoader.execStopRoutines(); await appLoader.unmount(); - (0, polyfill_1.removePolyfill)("startup"); } catch (err) { console.error('关闭服务器时出错:', err); diff --git a/src/server/start.ts b/src/server/start.ts index 541098f..b517f53 100644 --- a/src/server/start.ts +++ b/src/server/start.ts @@ -25,7 +25,6 @@ import mount from 'koa-mount'; import chalk from 'chalk'; import { checkNodeVersion, randomString } from '../utils'; import bcrypt from 'bcryptjs'; -import { LogFormatter, polyfillConsole, removePolyfill } from './polyfill'; checkNodeVersion() @@ -216,7 +215,7 @@ export async function startup