{"action":"created","comment":{"url":"https://api.github.com/repos/mongodb-js/mongodb-core/pulls/comments/217713765","pull_request_review_id":155492865,"id":217713765,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzcxMzc2NQ==","diff_hunk":"@@ -1152,71 +1144,72 @@ Mongos.prototype.auth = function(mechanism, db) {\n \n   // Topology is not connected, save the call in the provided store to be\n   // Executed at some point when the handler deems it's reconnected\n-  if (!self.isConnected() && self.s.disconnectHandler != null) {\n-    return self.s.disconnectHandler.add('auth', db, allArgs, {}, callback);\n+  if (!this.isConnected() && this.s.disconnectHandler != null) {\n+    return this.s.disconnectHandler.add('auth', source, [credentials, callback], {}, callback);\n   }\n \n-  // Set to authenticating\n-  this.authenticating = true;\n-  // All errors\n-  var errors = [];\n-\n   // Get all the servers\n-  var servers = this.connectedProxies.slice(0);\n+  const servers = this.connectedProxies.slice(0);\n+\n+  // Get total count\n+  let count = servers.length;\n+\n   // No servers return\n-  if (servers.length === 0) {\n+  if (count === 0) {\n     this.authenticating = false;\n-    callback(null, true);\n+    return callback(null, true);","path":"lib/topologies/mongos.js","position":79,"original_position":79,"commit_id":"084d13c84ac36ba8ca2ff1414b97abc1b9cb2af8","original_commit_id":"084d13c84ac36ba8ca2ff1414b97abc1b9cb2af8","user":{"login":"mbroadst","id":312966,"node_id":"MDQ6VXNlcjMxMjk2Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/312966?v=4","gravatar_id":"","url":"https://api.github.com/users/mbroadst","html_url":"https://github.com/mbroadst","followers_url":"https://api.github.com/users/mbroadst/followers","following_url":"https://api.github.com/users/mbroadst/following{/other_user}","gists_url":"https://api.github.com/users/mbroadst/gists{/gist_id}","starred_url":"https://api.github.com/users/mbroadst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbroadst/subscriptions","organizations_url":"https://api.github.com/users/mbroadst/orgs","repos_url":"https://api.github.com/users/mbroadst/repos","events_url":"https://api.github.com/users/mbroadst/events{/privacy}","received_events_url":"https://api.github.com/users/mbroadst/received_events","type":"User","site_admin":false},"body":"wow looks like that was a long outstanding bug, are you sure we haven't come to rely on this behavior?","created_at":"2018-09-14T13:33:14Z","updated_at":"2018-09-14T13:39:17Z","html_url":"https://github.com/mongodb-js/mongodb-core/pull/348#discussion_r217713765","pull_request_url":"https://api.github.com/repos/mongodb-js/mongodb-core/pulls/348","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/mongodb-js/mongodb-core/pulls/comments/217713765"},"html":{"href":"https://github.com/mongodb-js/mongodb-core/pull/348#discussion_r217713765"},"pull_request":{"href":"https://api.github.com/repos/mongodb-js/mongodb-core/pulls/348"}}},"pull_request":{"url":"https://api.github.com/repos/mongodb-js/mongodb-core/pulls/348","id":211562116,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExNTYyMTE2","html_url":"https://github.com/mongodb-js/mongodb-core/pull/348","diff_url":"https://github.com/mongodb-js/mongodb-core/pull/348.diff","patch_url":"https://github.com/mongodb-js/mongodb-core/pull/348.patch","issue_url":"https://api.github.com/repos/mongodb-js/mongodb-core/issues/348","number":348,"state":"open","locked":false,"title":"refactor(auth): refactor auth","user":{"login":"daprahamian","id":7957497,"node_id":"MDQ6VXNlcjc5NTc0OTc=","avatar_url":"https://avatars3.githubusercontent.com/u/7957497?v=4","gravatar_id":"","url":"https://api.github.com/users/daprahamian","html_url":"https://github.com/daprahamian","followers_url":"https://api.github.com/users/daprahamian/followers","following_url":"https://api.github.com/users/daprahamian/following{/other_user}","gists_url":"https://api.github.com/users/daprahamian/gists{/gist_id}","starred_url":"https://api.github.com/users/daprahamian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daprahamian/subscriptions","organizations_url":"https://api.github.com/users/daprahamian/orgs","repos_url":"https://api.github.com/users/daprahamian/repos","events_url":"https://api.github.com/users/daprahamian/events{/privacy}","received_events_url":"https://api.github.com/users/daprahamian/received_events","type":"User","site_admin":false},"body":"First part of a major refactor. Next parts are:\r\n\r\n + [ ] Fully integrating SCRAM into the AuthProvider class (scram is more complicated and requires more refactoring\r\n+ [ ] Switch to using MongoCredentials object within all of mongodb-core.","created_at":"2018-08-28T21:22:02Z","updated_at":"2018-09-14T13:39:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"faada40104f4c6e6bc1aafef7a4cbc8607040a84","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mongodb-js/mongodb-core/pulls/348/commits","review_comments_url":"https://api.github.com/repos/mongodb-js/mongodb-core/pulls/348/comments","review_comment_url":"https://api.github.com/repos/mongodb-js/mongodb-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mongodb-js/mongodb-core/issues/348/comments","statuses_url":"https://api.github.com/repos/mongodb-js/mongodb-core/statuses/084d13c84ac36ba8ca2ff1414b97abc1b9cb2af8","head":{"label":"mongodb-js:NODE-1442/MongoCredentialsObject","ref":"NODE-1442/MongoCredentialsObject","sha":"084d13c84ac36ba8ca2ff1414b97abc1b9cb2af8","user":{"login":"mongodb-js","id":11214950,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjE0OTUw","avatar_url":"https://avatars3.githubusercontent.com/u/11214950?v=4","gravatar_id":"","url":"https://api.github.com/users/mongodb-js","html_url":"https://github.com/mongodb-js","followers_url":"https://api.github.com/users/mongodb-js/followers","following_url":"https://api.github.com/users/mongodb-js/following{/other_user}","gists_url":"https://api.github.com/users/mongodb-js/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb-js/subscriptions","organizations_url":"https://api.github.com/users/mongodb-js/orgs","repos_url":"https://api.github.com/users/mongodb-js/repos","events_url":"https://api.github.com/users/mongodb-js/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb-js/received_events","type":"Organization","site_admin":false},"repo":{"id":17979442,"node_id":"MDEwOlJlcG9zaXRvcnkxNzk3OTQ0Mg==","name":"mongodb-core","full_name":"mongodb-js/mongodb-core","owner":{"login":"mongodb-js","id":11214950,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjE0OTUw","avatar_url":"https://avatars3.githubusercontent.com/u/11214950?v=4","gravatar_id":"","url":"https://api.github.com/users/mongodb-js","html_url":"https://github.com/mongodb-js","followers_url":"https://api.github.com/users/mongodb-js/followers","following_url":"https://api.github.com/users/mongodb-js/following{/other_user}","gists_url":"https://api.github.com/users/mongodb-js/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb-js/subscriptions","organizations_url":"https://api.github.com/users/mongodb-js/orgs","repos_url":"https://api.github.com/users/mongodb-js/repos","events_url":"https://api.github.com/users/mongodb-js/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb-js/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mongodb-js/mongodb-core","description":"MongoDB core driver functionality aims to make the \"smallest\" viable driver api","fork":false,"url":"https://api.github.com/repos/mongodb-js/mongodb-core","forks_url":"https://api.github.com/repos/mongodb-js/mongodb-core/forks","keys_url":"https://api.github.com/repos/mongodb-js/mongodb-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mongodb-js/mongodb-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mongodb-js/mongodb-core/teams","hooks_url":"https://api.github.com/repos/mongodb-js/mongodb-core/hooks","issue_events_url":"https://api.github.com/repos/mongodb-js/mongodb-core/issues/events{/number}","events_url":"https://api.github.com/repos/mongodb-js/mongodb-core/events","assignees_url":"https://api.github.com/repos/mongodb-js/mongodb-core/assignees{/user}","branches_url":"https://api.github.com/repos/mongodb-js/mongodb-core/branches{/branch}","tags_url":"https://api.github.com/repos/mongodb-js/mongodb-core/tags","blobs_url":"https://api.github.com/repos/mongodb-js/mongodb-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mongodb-js/mongodb-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mongodb-js/mongodb-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/mongodb-js/mongodb-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mongodb-js/mongodb-core/statuses/{sha}","languages_url":"https://api.github.com/repos/mongodb-js/mongodb-core/languages","stargazers_url":"https://api.github.com/repos/mongodb-js/mongodb-core/stargazers","contributors_url":"https://api.github.com/repos/mongodb-js/mongodb-core/contributors","subscribers_url":"https://api.github.com/repos/mongodb-js/mongodb-core/subscribers","subscription_url":"https://api.github.com/repos/mongodb-js/mongodb-core/subscription","commits_url":"https://api.github.com/repos/mongodb-js/mongodb-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/mongodb-js/mongodb-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/mongodb-js/mongodb-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/mongodb-js/mongodb-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/mongodb-js/mongodb-core/contents/{+path}","compare_url":"https://api.github.com/repos/mongodb-js/mongodb-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mongodb-js/mongodb-core/merges","archive_url":"https://api.github.com/repos/mongodb-js/mongodb-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mongodb-js/mongodb-core/downloads","issues_url":"https://api.github.com/repos/mongodb-js/mongodb-core/issues{/number}","pulls_url":"https://api.github.com/repos/mongodb-js/mongodb-core/pulls{/number}","milestones_url":"https://api.github.com/repos/mongodb-js/mongodb-core/milestones{/number}","notifications_url":"https://api.github.com/repos/mongodb-js/mongodb-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mongodb-js/mongodb-core/labels{/name}","releases_url":"https://api.github.com/repos/mongodb-js/mongodb-core/releases{/id}","deployments_url":"https://api.github.com/repos/mongodb-js/mongodb-core/deployments","created_at":"2014-03-21T12:38:24Z","updated_at":"2018-09-10T17:27:41Z","pushed_at":"2018-09-13T21:37:18Z","git_url":"git://github.com/mongodb-js/mongodb-core.git","ssh_url":"git@github.com:mongodb-js/mongodb-core.git","clone_url":"https://github.com/mongodb-js/mongodb-core.git","svn_url":"https://github.com/mongodb-js/mongodb-core","homepage":null,"size":5325,"stargazers_count":135,"watchers_count":135,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":102,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":102,"open_issues":15,"watchers":135,"default_branch":"master"}},"base":{"label":"mongodb-js:master","ref":"master","sha":"f969beee139e07d7ae88ab1e584d96b38778c28d","user":{"login":"mongodb-js","id":11214950,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjE0OTUw","avatar_url":"https://avatars3.githubusercontent.com/u/11214950?v=4","gravatar_id":"","url":"https://api.github.com/users/mongodb-js","html_url":"https://github.com/mongodb-js","followers_url":"https://api.github.com/users/mongodb-js/followers","following_url":"https://api.github.com/users/mongodb-js/following{/other_user}","gists_url":"https://api.github.com/users/mongodb-js/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb-js/subscriptions","organizations_url":"https://api.github.com/users/mongodb-js/orgs","repos_url":"https://api.github.com/users/mongodb-js/repos","events_url":"https://api.github.com/users/mongodb-js/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb-js/received_events","type":"Organization","site_admin":false},"repo":{"id":17979442,"node_id":"MDEwOlJlcG9zaXRvcnkxNzk3OTQ0Mg==","name":"mongodb-core","full_name":"mongodb-js/mongodb-core","owner":{"login":"mongodb-js","id":11214950,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjE0OTUw","avatar_url":"https://avatars3.githubusercontent.com/u/11214950?v=4","gravatar_id":"","url":"https://api.github.com/users/mongodb-js","html_url":"https://github.com/mongodb-js","followers_url":"https://api.github.com/users/mongodb-js/followers","following_url":"https://api.github.com/users/mongodb-js/following{/other_user}","gists_url":"https://api.github.com/users/mongodb-js/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb-js/subscriptions","organizations_url":"https://api.github.com/users/mongodb-js/orgs","repos_url":"https://api.github.com/users/mongodb-js/repos","events_url":"https://api.github.com/users/mongodb-js/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb-js/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mongodb-js/mongodb-core","description":"MongoDB core driver functionality aims to make the \"smallest\" viable driver api","fork":false,"url":"https://api.github.com/repos/mongodb-js/mongodb-core","forks_url":"https://api.github.com/repos/mongodb-js/mongodb-core/forks","keys_url":"https://api.github.com/repos/mongodb-js/mongodb-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mongodb-js/mongodb-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mongodb-js/mongodb-core/teams","hooks_url":"https://api.github.com/repos/mongodb-js/mongodb-core/hooks","issue_events_url":"https://api.github.com/repos/mongodb-js/mongodb-core/issues/events{/number}","events_url":"https://api.github.com/repos/mongodb-js/mongodb-core/events","assignees_url":"https://api.github.com/repos/mongodb-js/mongodb-core/assignees{/user}","branches_url":"https://api.github.com/repos/mongodb-js/mongodb-core/branches{/branch}","tags_url":"https://api.github.com/repos/mongodb-js/mongodb-core/tags","blobs_url":"https://api.github.com/repos/mongodb-js/mongodb-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mongodb-js/mongodb-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mongodb-js/mongodb-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/mongodb-js/mongodb-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mongodb-js/mongodb-core/statuses/{sha}","languages_url":"https://api.github.com/repos/mongodb-js/mongodb-core/languages","stargazers_url":"https://api.github.com/repos/mongodb-js/mongodb-core/stargazers","contributors_url":"https://api.github.com/repos/mongodb-js/mongodb-core/contributors","subscribers_url":"https://api.github.com/repos/mongodb-js/mongodb-core/subscribers","subscription_url":"https://api.github.com/repos/mongodb-js/mongodb-core/subscription","commits_url":"https://api.github.com/repos/mongodb-js/mongodb-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/mongodb-js/mongodb-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/mongodb-js/mongodb-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/mongodb-js/mongodb-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/mongodb-js/mongodb-core/contents/{+path}","compare_url":"https://api.github.com/repos/mongodb-js/mongodb-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mongodb-js/mongodb-core/merges","archive_url":"https://api.github.com/repos/mongodb-js/mongodb-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mongodb-js/mongodb-core/downloads","issues_url":"https://api.github.com/repos/mongodb-js/mongodb-core/issues{/number}","pulls_url":"https://api.github.com/repos/mongodb-js/mongodb-core/pulls{/number}","milestones_url":"https://api.github.com/repos/mongodb-js/mongodb-core/milestones{/number}","notifications_url":"https://api.github.com/repos/mongodb-js/mongodb-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mongodb-js/mongodb-core/labels{/name}","releases_url":"https://api.github.com/repos/mongodb-js/mongodb-core/releases{/id}","deployments_url":"https://api.github.com/repos/mongodb-js/mongodb-core/deployments","created_at":"2014-03-21T12:38:24Z","updated_at":"2018-09-10T17:27:41Z","pushed_at":"2018-09-13T21:37:18Z","git_url":"git://github.com/mongodb-js/mongodb-core.git","ssh_url":"git@github.com:mongodb-js/mongodb-core.git","clone_url":"https://github.com/mongodb-js/mongodb-core.git","svn_url":"https://github.com/mongodb-js/mongodb-core","homepage":null,"size":5325,"stargazers_count":135,"watchers_count":135,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":102,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":102,"open_issues":15,"watchers":135,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mongodb-js/mongodb-core/pulls/348"},"html":{"href":"https://github.com/mongodb-js/mongodb-core/pull/348"},"issue":{"href":"https://api.github.com/repos/mongodb-js/mongodb-core/issues/348"},"comments":{"href":"https://api.github.com/repos/mongodb-js/mongodb-core/issues/348/comments"},"review_comments":{"href":"https://api.github.com/repos/mongodb-js/mongodb-core/pulls/348/comments"},"review_comment":{"href":"https://api.github.com/repos/mongodb-js/mongodb-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mongodb-js/mongodb-core/pulls/348/commits"},"statuses":{"href":"https://api.github.com/repos/mongodb-js/mongodb-core/statuses/084d13c84ac36ba8ca2ff1414b97abc1b9cb2af8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mbroadst"}}