make sure balancer gets deleted when ther is no backend
This commit is contained in:
parent
e9dc275b81
commit
da3a87646a
2 changed files with 39 additions and 16 deletions
|
|
@ -389,7 +389,7 @@ http {
|
|||
server 0.0.0.1; # placeholder
|
||||
|
||||
balancer_by_lua_block {
|
||||
balancer.call()
|
||||
balancer.balance()
|
||||
}
|
||||
|
||||
{{ if (gt $cfg.UpstreamKeepaliveConnections 0) }}
|
||||
|
|
@ -833,6 +833,11 @@ stream {
|
|||
|
||||
location {{ $path }} {
|
||||
{{ if not $all.DisableLua }}
|
||||
rewrite_by_lua_block {
|
||||
{{ if $all.DynamicConfigurationEnabled}}
|
||||
balancer.rewrite()
|
||||
{{ end }}
|
||||
}
|
||||
{{ if shouldConfigureLuaRestyWAF $all.Cfg.DisableLuaRestyWAF $location.LuaRestyWAF.Mode }}
|
||||
access_by_lua_block {
|
||||
local lua_resty_waf = require("resty.waf")
|
||||
|
|
@ -880,7 +885,7 @@ stream {
|
|||
waf:exec()
|
||||
{{ end }}
|
||||
{{ if $all.DynamicConfigurationEnabled}}
|
||||
balancer.call()
|
||||
balancer.log()
|
||||
{{ end }}
|
||||
}
|
||||
{{ end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue