Skip to content

Commit

Permalink
Merge pull request #8378 from dolthub/aaron/remotestorage-ioCopy-leak
Browse files Browse the repository at this point in the history
go: doltcore/remotestorage: reliable: Fix leaked goroutines when the context is canceled while reading the HTTP response.
  • Loading branch information
reltuk authored Sep 24, 2024
2 parents bf8d3e8 + 4a6db7e commit f4c9dc4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions go/libraries/doltcore/remotestorage/internal/reliable/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,11 @@ func StreamingRangeDownload(ctx context.Context, req StreamingRangeRequest) Stre
}()

return StreamingResponse{
Body: r,
cancel: cancel,
Body: r,
cancel: func() {
r.Close()
cancel()
},
}
}

Expand Down

0 comments on commit f4c9dc4

Please sign in to comment.