优化全局数据存储方式,以节点 id 为 key 保存相关数据;修复节点下线监听未关闭问题

This commit is contained in:
2025-05-17 11:02:18 +08:00
parent 84e01d3b50
commit c1664aa898
10 changed files with 77 additions and 51 deletions

View File

@@ -4,6 +4,7 @@ import (
"context"
"log/slog"
"proxy-server/gateway/core"
"proxy-server/gateway/env"
"proxy-server/utils"
"sync"
)
@@ -29,7 +30,7 @@ func New() *Service {
}
func (s *Service) Run() error {
slog.Info("启动转发服务")
slog.Info("启动转发服务", "控制通道", env.AppCtrlPort, "数据通道", env.AppDataPort)
errQuit := make(chan struct{}, 2)
defer close(errQuit)