Skip to content

Commit

Permalink
fix: add defer conn.Close() on planetmint grpc connection (#13)
Browse files Browse the repository at this point in the history
Signed-off-by: Lorenz Herzberger <[email protected]>
  • Loading branch information
LaurentMontBlanc authored Sep 3, 2024
1 parent c0eaf9d commit b51806d
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 b51806d

Please sign in to comment.