From dd3f17007030d3bb1832b12a73c5a38fdb78c620 Mon Sep 17 00:00:00 2001 From: Benjamin Jee Date: Wed, 11 Dec 2024 15:20:23 -0800 Subject: [PATCH] Refactor small code fix --- internal/mode/static/nginx/config/upstreams.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/internal/mode/static/nginx/config/upstreams.go b/internal/mode/static/nginx/config/upstreams.go index 915001ff64..7722f6f0a9 100644 --- a/internal/mode/static/nginx/config/upstreams.go +++ b/internal/mode/static/nginx/config/upstreams.go @@ -169,15 +169,10 @@ func (g GeneratorImpl) createUpstream( } return http.Upstream{ - Name: up.Name, - ZoneSize: zoneSize, - Servers: upstreamServers, - KeepAlive: http.UpstreamKeepAlive{ - Connections: upstreamPolicySettings.KeepAlive.Connections, - Requests: upstreamPolicySettings.KeepAlive.Requests, - Time: upstreamPolicySettings.KeepAlive.Time, - Timeout: upstreamPolicySettings.KeepAlive.Timeout, - }, + Name: up.Name, + ZoneSize: zoneSize, + Servers: upstreamServers, + KeepAlive: upstreamPolicySettings.KeepAlive, } }