Skip to content

Commit 1c61d69

Browse files
authored
fix(artifact): fix ctx issue (#91)
Because using http ctx will make subsequent goroutine cancled when http response. This commit use new ctx.
1 parent 2146e4e commit 1c61d69

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/handler/knowledgebasefiles.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,8 @@ func (ph *PublicHandler) DeleteCatalogFile(
353353
// TODO: need to use clean worker in the future
354354
go utils.GoRecover(
355355
func() {
356+
// to prevent parent context from being cancelled, create a new context
357+
ctx := context.TODO()
356358
// delete the file from minio
357359
objectPaths := []string{}
358360
// kb file in minio

0 commit comments

Comments
 (0)