fix: clean up SmartProxy lifecycle
This commit is contained in:
@@ -130,12 +130,9 @@ export class OneboxReverseProxy {
|
||||
/**
|
||||
* Remove a route
|
||||
*/
|
||||
removeRoute(domain: string): void {
|
||||
async removeRoute(domain: string): Promise<void> {
|
||||
if (this.routes.delete(domain)) {
|
||||
// Remove from SmartProxy (async but we don't wait)
|
||||
this.smartProxy.removeRoute(domain).catch((error) => {
|
||||
logger.error(`Failed to remove SmartProxy route for ${domain}: ${getErrorMessage(error)}`);
|
||||
});
|
||||
await this.smartProxy.removeRoute(domain);
|
||||
logger.success(`Removed proxy route: ${domain}`);
|
||||
} else {
|
||||
logger.warn(`Route not found: ${domain}`);
|
||||
|
||||
Reference in New Issue
Block a user