From 0df6291209eda80efc63243afcb2c72020282093 Mon Sep 17 00:00:00 2001 From: ANAND KUMAR JHA <36113559+anandkumarjha54321@users.noreply.github.com> Date: Wed, 19 Jun 2024 15:48:32 +0530 Subject: [PATCH] Update client.go Redundant error handling removed. --- mongo/client.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mongo/client.go b/mongo/client.go index 280749c7dd..679cda6ae2 100644 --- a/mongo/client.go +++ b/mongo/client.go @@ -209,10 +209,7 @@ func NewClient(opts ...*options.ClientOptions) (*Client, error) { clientOpt.SetMaxPoolSize(defaultMaxPoolSize) } - if err != nil { - return nil, err - } - + cfg, err := topology.NewConfig(clientOpt, client.clock) if err != nil { return nil, err