1
1
mirror of https://github.com/go-gitea/gitea synced 2025-01-12 18:54:28 +00:00
zeripath 20c2bdf86b
Ensure BlameReaders close at end of request (#12102) (#12103)
Backport #12102

this was thought to be due to timeouts, however on closer look this
appears to be due to the Close() function of the BlameReader hanging
with a blocked stdout pipe.

This PR fixes this Close function to:

* Cancel the context of the cmd
* Close the StdoutReader - ensuring that the output pipe is closed

Further it makes the context of the `git blame` command a child of the
request context - ensuring that even if Close() is not called, on
cancellation of the Request the blame is command will also be cancelled.

Fixes #11716
Closes #11727

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-07-01 18:43:25 +03:00
..
2020-04-05 07:20:50 +01:00
2020-04-05 07:20:50 +01:00
2019-06-12 15:41:28 -04:00
2018-11-04 22:20:00 -05:00
2019-06-12 15:41:28 -04:00
2020-04-05 07:20:50 +01:00
2019-11-22 08:03:45 +00:00
2019-03-08 11:42:50 -05:00
2019-08-17 13:10:17 +03:00
2020-04-05 07:20:50 +01:00