Skip to content

Commit

Permalink
Fix unclosed session bug (#2214)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethantkoenig authored and lunny committed Jul 26, 2017
1 parent 7e12aac commit 5f37944
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5f37944

Please sign in to comment.