Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/git/gitpipe/catfile_info.go')
-rw-r--r--internal/git/gitpipe/catfile_info.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/git/gitpipe/catfile_info.go b/internal/git/gitpipe/catfile_info.go
index 9f821f5ae..7f36aeafd 100644
--- a/internal/git/gitpipe/catfile_info.go
+++ b/internal/git/gitpipe/catfile_info.go
@@ -82,6 +82,15 @@ func CatfileInfo(
objectID: it.ObjectID(),
objectName: it.ObjectName(),
}); isDone {
+ // If the context got cancelled, then we need to flush out all
+ // outstanding requests so that the downstream consumer is
+ // unblocked.
+ if err := queue.Flush(); err != nil {
+ sendCatfileInfoRequest(ctx, requestChan, catfileInfoRequest{err: err})
+ return
+ }
+
+ sendCatfileInfoRequest(ctx, requestChan, catfileInfoRequest{err: ctx.Err()})
return
}