Skip to content

Commit

Permalink
Fix duplicated code
Browse files Browse the repository at this point in the history
  • Loading branch information
gaby authored Nov 16, 2023
1 parent 9190b12 commit 748f85b
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions mongodb/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ func New(config ...Config) *Storage {
panic(err)
}

ctx, cancel := context.WithTimeout(context.TODO(), 20*time.Second)
defer cancel()
if err = client.Connect(ctx); err != nil {
panic(err)
}

// verify that the client can connect
if err = client.Ping(context.Background(), nil); err != nil {
panic(err)
Expand Down

0 comments on commit 748f85b

Please sign in to comment.