Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1067

ping can not reject invalid passwords

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Connections
    • Labels:
      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 Unassigned
            Reporter:
            star_hdz HouDezhi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: