Skip to content

Commit

Permalink
Disconnect fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
richygreat committed May 3, 2023
1 parent c339143 commit 3ce4c45
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mdu/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ func Init(conf *Config, dbName string, opts ...*options.ClientOptions) (err erro
}

func Disconnect() {
if client == nil {
return
}
err := client.Disconnect(Ctx())
if err != nil {
fmt.Println("failed to disconnect from database.")
Expand Down

0 comments on commit 3ce4c45

Please sign in to comment.