mirror of
https://github.com/gravitational/teleport
synced 2024-10-22 02:03:24 +00:00
re-init proxywatcher on empty proxy list
This commit is contained in:
parent
1613979ee3
commit
e9326d7370
|
@ -237,6 +237,11 @@ func (p *ProxyWatcher) watch() error {
|
|||
if err != nil {
|
||||
return trace.Wrap(err)
|
||||
}
|
||||
if len(proxies) == 0 {
|
||||
// at least 1 proxy aught to exist; yield back to the outer
|
||||
// retry loop and try again.
|
||||
return trace.NotFound("empty proxy list")
|
||||
}
|
||||
proxySet := make(map[string]Server, len(proxies))
|
||||
for i := range proxies {
|
||||
proxySet[proxies[i].GetName()] = proxies[i]
|
||||
|
|
Loading…
Reference in a new issue