fix: bad mapKey typing

This commit is contained in:
Derrick Hammer 2024-03-28 21:42:12 -04:00
parent 0679a7cc3b
commit 775d3f7e6f
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 1 deletions

View File

@ -494,7 +494,8 @@ func (t *TusHandler) worker() {
continue
}
mapKey := append(decodedHash.HashBytes(), []byte(info.Upload.ID)...)
mapKey := append([]byte{}, decodedHash.HashBytes()...)
mapKey = append(mapKey, []byte(info.Upload.ID)...)
if _, ok := t.uploadMutexMap.Load(mapKey); !ok {
t.uploadMutexMap.Store(mapKey, &sync.Mutex{})
}