[#74] Replace atomics with mutex for reloadable params
All checks were successful
/ DCO (pull_request) Successful in 1m7s
/ Vulncheck (pull_request) Successful in 1m28s
/ Builds (1.20) (pull_request) Successful in 1m37s
/ Builds (1.21) (pull_request) Successful in 1m12s
/ Lint (pull_request) Successful in 14m9s
/ Tests (1.20) (pull_request) Successful in 1m41s
/ Tests (1.21) (pull_request) Successful in 9m36s

Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
This commit is contained in:
Marina Biryukova 2023-09-05 18:17:22 +03:00
parent d219943542
commit e26577e753
4 changed files with 45 additions and 32 deletions

View file

@ -121,7 +121,7 @@ func (h *Handler) Upload(req *fasthttp.RequestCtx) {
attributes = append(attributes, *filename)
}
// sets Timestamp attribute if it wasn't set from header and enabled by settings
if _, ok := filtered[object.AttributeTimestamp]; !ok && h.settings.DefaultTimestamp() {
if _, ok := filtered[object.AttributeTimestamp]; !ok && h.config.DefaultTimestamp() {
timestamp := object.NewAttribute()
timestamp.SetKey(object.AttributeTimestamp)
timestamp.SetValue(strconv.FormatInt(time.Now().Unix(), 10))