Fix incorrect lock usage

This commit is contained in:
Michael Schurter
2017-01-19 11:39:18 -08:00
parent c2ec30c47b
commit cf0157af89

View File

@@ -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",