mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-04-10 22:03:39 +00:00
Appease the errcheck gods
This commit is contained in:
parent
cd6cbae702
commit
cac8b9d14c
1 changed files with 8 additions and 1 deletions
|
@ -20,6 +20,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/matrix-org/gomatrixserverlib"
|
"github.com/matrix-org/gomatrixserverlib"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
const appserviceEventsSchema = `
|
const appserviceEventsSchema = `
|
||||||
|
@ -106,7 +107,13 @@ func (s *eventsStatements) selectEventsByApplicationServiceID(
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
defer eventRows.Close() // nolint: errcheck
|
defer func() {
|
||||||
|
err = eventRows.Close()
|
||||||
|
if err != nil {
|
||||||
|
log.WithError(err).Fatalf("Appservice %s unable to select new events to send",
|
||||||
|
applicationServiceID)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
// Iterate through each row and store event contents
|
// Iterate through each row and store event contents
|
||||||
for eventRows.Next() {
|
for eventRows.Next() {
|
||||||
|
|
Loading…
Reference in a new issue