1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-04 14:46:57 -05:00

Fix unclosed session bug (#2214)

This commit is contained in:
Ethan Koenig 2017-07-26 02:30:47 -07:00 committed by Lunny Xiao
parent 7e12aac61c
commit 5f37944dff

View File

@ -1097,8 +1097,8 @@ func Issues(opts *IssuesOptions) ([]*Issue, error) {
sess = x.Limit(setting.UI.IssuePagingNum, start)
} else {
sess = x.NewSession()
defer sess.Close()
}
defer sess.Close()
if len(opts.IssueIDs) > 0 {
sess.In("issue.id", opts.IssueIDs)