refactor: update pool initialization to include pool key

This commit is contained in:
yusing
2026-02-13 22:10:46 +08:00
parent 91f2c4993c
commit fa9239f5eb
5 changed files with 6 additions and 6 deletions

View File

@@ -66,8 +66,8 @@ func NewEntrypoint(parent task.Parent, cfg *Config) *Entrypoint {
cfg: cfg,
findRouteFunc: findRouteAnyDomain,
shortLinkMatcher: newShortLinkMatcher(),
streamRoutes: pool.New[types.StreamRoute]("stream_routes"),
excludedRoutes: pool.New[types.Route]("excluded_routes"),
streamRoutes: pool.New[types.StreamRoute]("stream_routes", "stream_routes"),
excludedRoutes: pool.New[types.Route]("excluded_routes", "excluded_routes"),
servers: xsync.NewMap[string, *httpServer](),
}
return ep

View File

@@ -80,7 +80,7 @@ func (srv *httpServer) Listen(addr string, proto HTTPProto) error {
}
srv.stopFunc = task.FinishAndWait
srv.addr = addr
srv.routes = pool.New[types.HTTPRoute](fmt.Sprintf("[%s] %s", proto, addr))
srv.routes = pool.New[types.HTTPRoute](fmt.Sprintf("[%s] %s", proto, addr), "http_routes")
srv.routes.DisableLog(srv.ep.httpPoolDisableLog.Load())
return nil
}