From fa96d371d63b90c0ca3d39fd73014397c535b809 Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Wed, 20 May 2026 14:27:17 +0000 Subject: [PATCH] fix(proxy): reload routes after SmartProxy startup --- ts/classes/smartproxy.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ts/classes/smartproxy.ts b/ts/classes/smartproxy.ts index d0fb074..f8705d6 100644 --- a/ts/classes/smartproxy.ts +++ b/ts/classes/smartproxy.ts @@ -179,7 +179,7 @@ export class SmartProxyManager { await this.waitForReady(); this.serviceRunning = true; - await this.reloadConfig(); + await this.reloadConfig({ skipRunningCheck: true }); logger.success(`SmartProxy started (HTTP: ${this.httpPort}, HTTPS: ${this.httpsPort}, Admin: ${this.adminUrl})`); } catch (error) { @@ -360,11 +360,13 @@ export class SmartProxyManager { return routeConfigs; } - async reloadConfig(): Promise { - const isRunning = await this.isRunning(); - if (!isRunning) { - logger.warn('SmartProxy not running, cannot reload config'); - return; + async reloadConfig(options: { skipRunningCheck?: boolean } = {}): Promise { + if (!options.skipRunningCheck) { + const isRunning = await this.isRunning(); + if (!isRunning) { + logger.warn('SmartProxy not running, cannot reload config'); + return; + } } const routes = this.buildRoutes();