mirror of
https://github.com/kemko/nomad.git
synced 2026-01-09 03:45:41 +03:00
Fix incorrect lock usage
This commit is contained in:
@@ -1162,9 +1162,9 @@ func (r *TaskRunner) startTask() error {
|
||||
res, err := drv.Prestart(ctx, r.task)
|
||||
|
||||
// Merge newly created resources into previously created resources
|
||||
r.persistLock.Lock()
|
||||
r.createdResourcesLock.Lock()
|
||||
r.createdResources.Merge(res)
|
||||
r.persistLock.Unlock()
|
||||
r.createdResourcesLock.Unlock()
|
||||
|
||||
if err != nil {
|
||||
wrapped := fmt.Errorf("failed to initialize task %q for alloc %q: %v",
|
||||
|
||||
Reference in New Issue
Block a user