Skip to content

Commit

Permalink
defer close
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Feb 15, 2024
1 parent 2f63b4d commit 85e7465
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flow/connectors/postgres/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ func (c *PostgresConnector) CheckReplicationConnectivity(ctx context.Context) er
return fmt.Errorf("failed to create replication connection: %v", err)
}

defer conn.Close(ctx)

var one int
queryErr := conn.QueryRow(ctx, "SELECT 1").Scan(&one)
if queryErr != nil {
Expand Down

0 comments on commit 85e7465

Please sign in to comment.