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