Use the right variable for client scripts mod-since timestamp

This commit is contained in:
Denis Arh
2020-06-09 17:27:12 +02:00
parent 2a9e9411b6
commit 053ac9c09f
+3 -3
View File
@@ -823,9 +823,9 @@ func (svc *service) loadClientScripts(ctx context.Context) {
ctx, cancel := context.WithTimeout(ctx, svc.opt.ListTimeout)
defer cancel()
if !svc.sScriptsTS.IsZero() {
if !svc.cScriptsTS.IsZero() {
ctx = metadata.NewOutgoingContext(ctx, metadata.MD{
"if-modified-since": []string{svc.sScriptsTS.Format(time.RFC3339)},
"if-modified-since": []string{svc.cScriptsTS.Format(time.RFC3339)},
})
}
@@ -835,7 +835,7 @@ func (svc *service) loadClientScripts(ctx context.Context) {
return
}
svc.sScriptsTS = time.Now()
svc.cScriptsTS = time.Now()
if len(rsp.Scripts) > 0 {
svc.log.Debug("reloading client scripts")