mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 05:12:26 +03:00
Log errors from rows.Close (#920)
* Log errors from rows.Close * fixed imports * Added contextual messages * fixed review changes
This commit is contained in:
parent
c2bd0b97b3
commit
c019ad7086
43 changed files with 118 additions and 69 deletions
|
@ -17,6 +17,8 @@ package postgres
|
|||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
|
||||
"github.com/matrix-org/dendrite/common"
|
||||
)
|
||||
|
||||
const backwardExtremitiesSchema = `
|
||||
|
@ -91,7 +93,7 @@ func (s *backwardExtremitiesStatements) selectBackwardExtremitiesForRoom(
|
|||
if err != nil {
|
||||
return
|
||||
}
|
||||
defer rows.Close() // nolint: errcheck
|
||||
defer common.CloseAndLogIfError(ctx, rows, "selectBackwardExtremitiesForRoom: rows.close() failed")
|
||||
|
||||
for rows.Next() {
|
||||
var eID string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue