diff --git a/rootfs/etc/nginx/lua/tcp_udp_balancer.lua b/rootfs/etc/nginx/lua/tcp_udp_balancer.lua index 4a9694d09..10b49ce05 100644 --- a/rootfs/etc/nginx/lua/tcp_udp_balancer.lua +++ b/rootfs/etc/nginx/lua/tcp_udp_balancer.lua @@ -86,6 +86,8 @@ local function sync_backend(backend) local implementation = get_implementation(backend) local balancer = balancers[backend.name] + backend.endpoints = format_ipv6_endpoints(backend.endpoints) + if not balancer then balancers[backend.name] = implementation:new(backend) return @@ -105,8 +107,6 @@ local function sync_backend(backend) backend = resolve_external_names(backend) end - backend.endpoints = format_ipv6_endpoints(backend.endpoints) - balancer:sync(backend) end