fix Close() before checking errors
This commit is contained in:
parent
456f84b5c7
commit
f380631b5e
2
db.go
2
db.go
|
@ -366,10 +366,10 @@ func (tdb *TelemDb) GetAllDocuments(ctx context.Context) ([]json.RawMessage, err
|
|||
const getall = `SELECT data FROM openmct_objects`;
|
||||
|
||||
rows, err := tdb.db.QueryxContext(ctx, getall)
|
||||
defer rows.Close()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
docs := make([]json.RawMessage, 0)
|
||||
for rows.Next() {
|
||||
var j json.RawMessage
|
||||
|
|
Loading…
Reference in a new issue