ping can not reject invalid passwords

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Connections
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I connect to my mongodb server like this:
      client, _ := mongo.NewClient(options.Client().ApplyURI("mongodb://my_username:my_passwd@my_host:27017/my_db"))
      ctx, cancelFunc := context.WithTimeout(context.Background(), 10*time.Second)
      defer cancelFunc()
      _ = client.Connect(ctx)
      err = client.Ping(ctx, nil)
      But no matter what password I enter correctly or incorrectly, Ping will not get an error.
      So how can I find this error before I operate my mongo?

              Assignee:
              Unassigned
              Reporter:
              HouDezhi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: