Skip to content

Commit

Permalink
disconnect from database when done
Browse files Browse the repository at this point in the history
  • Loading branch information
andlinger committed Jun 2, 2023
1 parent 31c612c commit a1749fb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/healthcheck/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ func check(uri string) error {
if err != nil {
return err
}
defer func() {
if err = client.Disconnect(context.Background()); err != nil {
panic(err)
}
}()

var result bson.M

Expand Down

0 comments on commit a1749fb

Please sign in to comment.