Skip to content

Commit

Permalink
Merge pull request #91 from wework/fix-conn
Browse files Browse the repository at this point in the history
closing rows when querying transactional outbox fails
  • Loading branch information
Guy Baron authored Jun 23, 2019
2 parents 4adf30e + 58e1426 commit 8eb4f85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gbus/tx/mysql/txoutbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@ func (outbox *TxOutbox) sendMessages(recordSelector func(tx *sql.Tx) (*sql.Rows,

if selectErr != nil {
outbox.log().WithError(selectErr).Error("failed fetching messages from outbox")

err := rows.Close()
if err != nil {
outbox.log().WithError(err).Error("could not close Rows")
}
return selectErr
}

Expand Down

0 comments on commit 8eb4f85

Please sign in to comment.