Skip to content

Commit

Permalink
apply review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
trtlmn committed May 7, 2024
1 parent d53dbdb commit a320b8a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/storage/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,9 @@ func (s *Storage) QueryLogs(ctx context.Context, qr storage.QueryLogsRequest) (*
if err != nil {
return nil, MapError(err)
}
defer func() {
_ = cntRows.Close()
}()
var count int64
if count, err = scan[int64](cntRows); err != nil {
_ = cntRows.Close()
return nil, MapError(err)
}
// releasing the db connection before requesting a new one for avoiding a deadlock on limited connection pool
Expand Down

0 comments on commit a320b8a

Please sign in to comment.