Skip to content

Commit

Permalink
name context
Browse files Browse the repository at this point in the history
  • Loading branch information
tedim52 committed Oct 14, 2024
1 parent 21543b1 commit 98b5018
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func CopyFilesFromUserService(
output io.Writer,
dockerManager *docker_manager.DockerManager,
) error {
ctx = context.WithoutCancel(ctx)
ctxWithoutCancel := context.WithoutCancel(ctx)

srcPath := srcPathOnContainer
srcPathBase := filepath.Base(srcPathOnContainer)
Expand All @@ -36,13 +36,13 @@ func CopyFilesFromUserService(
}

logrus.Debugf("Copying contents from the src path: %v and base %v", srcPath, srcPathBase)
_, serviceDockerResources, err := getSingleUserServiceObjAndResourcesNoMutex(ctx, enclaveId, serviceUuid, dockerManager)
_, serviceDockerResources, err := getSingleUserServiceObjAndResourcesNoMutex(ctxWithoutCancel, enclaveId, serviceUuid, dockerManager)
if err != nil {
return stacktrace.Propagate(err, "An error occurred getting user service with UUID '%v' in enclave with ID '%v'", serviceUuid, enclaveId)
}
container := serviceDockerResources.ServiceContainer

tarStreamReadCloser, err := dockerManager.CopyFromContainer(ctx, container.GetId(), srcPath)
tarStreamReadCloser, err := dockerManager.CopyFromContainer(ctxWithoutCancel, container.GetId(), srcPath)
if err != nil {
return stacktrace.Propagate(
err,
Expand Down

0 comments on commit 98b5018

Please sign in to comment.