forked from forgejo/forgejo
Prevent dangling GetAttribute calls (#18754)
It appears possible that there could be a hang due to unread data from the repo-attribute command pipes. This PR simply closes these during the defer. Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
5348e198db
commit
4482f62a26
3 changed files with 13 additions and 7 deletions
|
@ -88,7 +88,10 @@ func (repo *Repository) GetLanguageStats(commitID string) (map[string]int64, err
|
|||
}
|
||||
}()
|
||||
}
|
||||
defer cancel()
|
||||
defer func() {
|
||||
_ = checker.Close()
|
||||
cancel()
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue