From 053ac9c09fb7284c68bf9b0a8314426d7e19266d Mon Sep 17 00:00:00 2001 From: Denis Arh Date: Tue, 9 Jun 2020 16:40:39 +0200 Subject: [PATCH] Use the right variable for client scripts mod-since timestamp --- pkg/corredor/service.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/corredor/service.go b/pkg/corredor/service.go index 0fbc43465..0e4034cde 100644 --- a/pkg/corredor/service.go +++ b/pkg/corredor/service.go @@ -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")