invalidate cache when switching context

mine
Gustavo Paiva 2019-10-23 23:01:41 -03:00
parent 4c0b02e9d2
commit 2cb7116fae
1 changed files with 1 additions and 0 deletions

View File

@ -332,6 +332,7 @@ func (a *APIClient) SwitchContextOrDie(ctx string) {
} }
if currentCtx != ctx { if currentCtx != ctx {
a.cachedDiscovery = nil
a.reset() a.reset()
if err := a.config.SwitchContext(ctx); err != nil { if err := a.config.SwitchContext(ctx); err != nil {
panic(err) panic(err)