Skip to content

Commit

Permalink
fix: add defer conn.Close() on planetmint grpc connection
Browse files Browse the repository at this point in the history
Signed-off-by: Lorenz Herzberger <[email protected]>
  • Loading branch information
LaurentMontBlanc committed Sep 2, 2024
1 parent c0eaf9d commit 0801b7b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions planetmint/planetmint_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func (pmc *Client) GetActiveDeviceCount() (count float64, err error) {
if err != nil {
return
}
defer conn.Close()

machineClient := types.NewQueryClient(conn)
response, err := machineClient.ActiveTrustAnchorCount(
Expand All @@ -52,6 +53,7 @@ func (pmc *Client) GetActivatedDeviceCount() (count float64, err error) {
if err != nil {
return
}
defer conn.Close()

machineClient := types.NewQueryClient(conn)
response, err := machineClient.ActivatedTrustAnchorCount(
Expand Down

0 comments on commit 0801b7b

Please sign in to comment.