Update cache on single protocol request

This commit is contained in:
Till Faelligen 2022-10-27 07:03:09 +02:00
parent 4f7da14cb0
commit 9ede09ee4e
No known key found for this signature in database
GPG key ID: 3DF82D8AB9211D4E

View file

@ -311,7 +311,7 @@ func (a *AppServiceQueryAPI) Protocols(
resp.Protocols = map[string]api.ASProtocolResponse{
req.Protocol: response,
}
a.ProtocolCache[req.Protocol] = response
return nil
}
@ -321,7 +321,7 @@ func (a *AppServiceQueryAPI) Protocols(
for _, p := range as.Protocols {
var proto api.ASProtocolResponse
if err := requestDo[api.ASProtocolResponse](a.HTTPClient, as.URL+api.ASProtocolPath+p, &proto); err != nil {
log.WithError(err).Error("unable to get protocolResponse from application service")
log.WithError(err).Error("unable to get 'protocol' from application service")
continue
}
existing, ok := response[p]