Skip to content

Commit

Permalink
tx.Conn.Close() for safety
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Feb 15, 2024
1 parent e696b8f commit 7b707b0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions flow/connectors/postgres/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ func (c *PostgresConnector) CheckPublicationPermission(ctx context.Context, tabl
if err != nil {
return fmt.Errorf("error starting transaction: %w", err)
}
defer tx.Conn().Close(ctx)
defer func() {
err := tx.Rollback(ctx)
if err != nil && err != pgx.ErrTxClosed {
Expand Down

0 comments on commit 7b707b0

Please sign in to comment.