{"action":"created","comment":{"url":"https://api.github.com/repos/datastax/nodejs-driver/pulls/comments/229253746","pull_request_review_id":169706109,"id":229253746,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTI1Mzc0Ng==","diff_hunk":"@@ -266,16 +271,21 @@ Host.prototype._checkPoolState = function () {\n   if (this.pool.isClosing()) {\n     return;\n   }\n+\n   if (this.pool.connections.length < this.pool.coreConnectionsLength) {\n-    // the pool still needs to grow\n+    // the pool needs to grow / reconnect\n     if (!this.pool.hasScheduledNewConnection()) {\n       this.reconnectionDelay = this.reconnectionSchedule.next().value;\n       this.pool.scheduleNewConnectionAttempt(this.reconnectionDelay);\n     }\n   }\n-  if (this._distance !== types.distance.ignored &&\n-      this.pool.connections.length === 0 &&\n-      this.pool.coreConnectionsLength > 0) {\n+\n+  if (\n+    this._distance !== types.distance.ignored &&\n+    this.pool.connections.length === 0 &&\n+    this.pool.coreConnectionsLength > 0\n+  ) {","path":"lib/host.js","position":68,"original_position":68,"commit_id":"9c30a9f86050b7f790f32b4e86330c49f7581fc2","original_commit_id":"9c30a9f86050b7f790f32b4e86330c49f7581fc2","user":{"login":"jorgebay","id":2931196,"node_id":"MDQ6VXNlcjI5MzExOTY=","avatar_url":"https://avatars3.githubusercontent.com/u/2931196?v=4","gravatar_id":"","url":"https://api.github.com/users/jorgebay","html_url":"https://github.com/jorgebay","followers_url":"https://api.github.com/users/jorgebay/followers","following_url":"https://api.github.com/users/jorgebay/following{/other_user}","gists_url":"https://api.github.com/users/jorgebay/gists{/gist_id}","starred_url":"https://api.github.com/users/jorgebay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorgebay/subscriptions","organizations_url":"https://api.github.com/users/jorgebay/orgs","repos_url":"https://api.github.com/users/jorgebay/repos","events_url":"https://api.github.com/users/jorgebay/events{/privacy}","received_events_url":"https://api.github.com/users/jorgebay/received_events","type":"User","site_admin":false},"body":"I'm not a big fan of any multiline if code style, I've changed to use airbnb's convention: https://github.com/airbnb/javascript/issues/1380\r\n\r\nI think the clearest way would be to assign it to a variable, i.e., `shouldHaveConnections`.","created_at":"2018-10-30T10:38:25Z","updated_at":"2018-10-30T10:38:26Z","html_url":"https://github.com/datastax/nodejs-driver/pull/289#discussion_r229253746","pull_request_url":"https://api.github.com/repos/datastax/nodejs-driver/pulls/289","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/datastax/nodejs-driver/pulls/comments/229253746"},"html":{"href":"https://github.com/datastax/nodejs-driver/pull/289#discussion_r229253746"},"pull_request":{"href":"https://api.github.com/repos/datastax/nodejs-driver/pulls/289"}},"in_reply_to_id":229027678},"pull_request":{"url":"https://api.github.com/repos/datastax/nodejs-driver/pulls/289","id":217278816,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3Mjc4ODE2","html_url":"https://github.com/datastax/nodejs-driver/pull/289","diff_url":"https://github.com/datastax/nodejs-driver/pull/289.diff","patch_url":"https://github.com/datastax/nodejs-driver/pull/289.patch","issue_url":"https://api.github.com/repos/datastax/nodejs-driver/issues/289","number":289,"state":"open","locked":false,"title":"Set the distance on newly added nodes","user":{"login":"jorgebay","id":2931196,"node_id":"MDQ6VXNlcjI5MzExOTY=","avatar_url":"https://avatars3.githubusercontent.com/u/2931196?v=4","gravatar_id":"","url":"https://api.github.com/users/jorgebay","html_url":"https://github.com/jorgebay","followers_url":"https://api.github.com/users/jorgebay/followers","following_url":"https://api.github.com/users/jorgebay/following{/other_user}","gists_url":"https://api.github.com/users/jorgebay/gists{/gist_id}","starred_url":"https://api.github.com/users/jorgebay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorgebay/subscriptions","organizations_url":"https://api.github.com/users/jorgebay/orgs","repos_url":"https://api.github.com/users/jorgebay/repos","events_url":"https://api.github.com/users/jorgebay/events{/privacy}","received_events_url":"https://api.github.com/users/jorgebay/received_events","type":"User","site_admin":false},"body":"https://datastax-oss.atlassian.net/browse/NODEJS-472\r\n\r\nFixes an issue where connections attempts were made to newly added nodes without considering the host distance.","created_at":"2018-09-21T13:09:43Z","updated_at":"2018-10-30T10:38:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d64752ffd558ebae6a2a6420a191b3cab79d4250","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/datastax/nodejs-driver/pulls/289/commits","review_comments_url":"https://api.github.com/repos/datastax/nodejs-driver/pulls/289/comments","review_comment_url":"https://api.github.com/repos/datastax/nodejs-driver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/datastax/nodejs-driver/issues/289/comments","statuses_url":"https://api.github.com/repos/datastax/nodejs-driver/statuses/9c30a9f86050b7f790f32b4e86330c49f7581fc2","head":{"label":"datastax:NODEJS-472","ref":"NODEJS-472","sha":"9c30a9f86050b7f790f32b4e86330c49f7581fc2","user":{"login":"datastax","id":573369,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3MzM2OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/573369?v=4","gravatar_id":"","url":"https://api.github.com/users/datastax","html_url":"https://github.com/datastax","followers_url":"https://api.github.com/users/datastax/followers","following_url":"https://api.github.com/users/datastax/following{/other_user}","gists_url":"https://api.github.com/users/datastax/gists{/gist_id}","starred_url":"https://api.github.com/users/datastax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datastax/subscriptions","organizations_url":"https://api.github.com/users/datastax/orgs","repos_url":"https://api.github.com/users/datastax/repos","events_url":"https://api.github.com/users/datastax/events{/privacy}","received_events_url":"https://api.github.com/users/datastax/received_events","type":"Organization","site_admin":false},"repo":{"id":23706552,"node_id":"MDEwOlJlcG9zaXRvcnkyMzcwNjU1Mg==","name":"nodejs-driver","full_name":"datastax/nodejs-driver","private":false,"owner":{"login":"datastax","id":573369,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3MzM2OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/573369?v=4","gravatar_id":"","url":"https://api.github.com/users/datastax","html_url":"https://github.com/datastax","followers_url":"https://api.github.com/users/datastax/followers","following_url":"https://api.github.com/users/datastax/following{/other_user}","gists_url":"https://api.github.com/users/datastax/gists{/gist_id}","starred_url":"https://api.github.com/users/datastax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datastax/subscriptions","organizations_url":"https://api.github.com/users/datastax/orgs","repos_url":"https://api.github.com/users/datastax/repos","events_url":"https://api.github.com/users/datastax/events{/privacy}","received_events_url":"https://api.github.com/users/datastax/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/datastax/nodejs-driver","description":"DataStax Node.js Driver for Apache Cassandra","fork":false,"url":"https://api.github.com/repos/datastax/nodejs-driver","forks_url":"https://api.github.com/repos/datastax/nodejs-driver/forks","keys_url":"https://api.github.com/repos/datastax/nodejs-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/datastax/nodejs-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/datastax/nodejs-driver/teams","hooks_url":"https://api.github.com/repos/datastax/nodejs-driver/hooks","issue_events_url":"https://api.github.com/repos/datastax/nodejs-driver/issues/events{/number}","events_url":"https://api.github.com/repos/datastax/nodejs-driver/events","assignees_url":"https://api.github.com/repos/datastax/nodejs-driver/assignees{/user}","branches_url":"https://api.github.com/repos/datastax/nodejs-driver/branches{/branch}","tags_url":"https://api.github.com/repos/datastax/nodejs-driver/tags","blobs_url":"https://api.github.com/repos/datastax/nodejs-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/datastax/nodejs-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/datastax/nodejs-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/datastax/nodejs-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/datastax/nodejs-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/datastax/nodejs-driver/languages","stargazers_url":"https://api.github.com/repos/datastax/nodejs-driver/stargazers","contributors_url":"https://api.github.com/repos/datastax/nodejs-driver/contributors","subscribers_url":"https://api.github.com/repos/datastax/nodejs-driver/subscribers","subscription_url":"https://api.github.com/repos/datastax/nodejs-driver/subscription","commits_url":"https://api.github.com/repos/datastax/nodejs-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/datastax/nodejs-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/datastax/nodejs-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/datastax/nodejs-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/datastax/nodejs-driver/contents/{+path}","compare_url":"https://api.github.com/repos/datastax/nodejs-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/datastax/nodejs-driver/merges","archive_url":"https://api.github.com/repos/datastax/nodejs-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/datastax/nodejs-driver/downloads","issues_url":"https://api.github.com/repos/datastax/nodejs-driver/issues{/number}","pulls_url":"https://api.github.com/repos/datastax/nodejs-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/datastax/nodejs-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/datastax/nodejs-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/datastax/nodejs-driver/labels{/name}","releases_url":"https://api.github.com/repos/datastax/nodejs-driver/releases{/id}","deployments_url":"https://api.github.com/repos/datastax/nodejs-driver/deployments","created_at":"2014-09-05T14:46:37Z","updated_at":"2018-10-29T12:31:13Z","pushed_at":"2018-10-29T12:31:09Z","git_url":"git://github.com/datastax/nodejs-driver.git","ssh_url":"git@github.com:datastax/nodejs-driver.git","clone_url":"https://github.com/datastax/nodejs-driver.git","svn_url":"https://github.com/datastax/nodejs-driver","homepage":null,"size":4290,"stargazers_count":810,"watchers_count":810,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":134,"mirror_url":null,"archived":false,"open_issues_count":12,"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":134,"open_issues":12,"watchers":810,"default_branch":"master"}},"base":{"label":"datastax:3.x","ref":"3.x","sha":"dc9ed6b5b4707c53c6bbd69abb42b2dc2c68044d","user":{"login":"datastax","id":573369,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3MzM2OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/573369?v=4","gravatar_id":"","url":"https://api.github.com/users/datastax","html_url":"https://github.com/datastax","followers_url":"https://api.github.com/users/datastax/followers","following_url":"https://api.github.com/users/datastax/following{/other_user}","gists_url":"https://api.github.com/users/datastax/gists{/gist_id}","starred_url":"https://api.github.com/users/datastax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datastax/subscriptions","organizations_url":"https://api.github.com/users/datastax/orgs","repos_url":"https://api.github.com/users/datastax/repos","events_url":"https://api.github.com/users/datastax/events{/privacy}","received_events_url":"https://api.github.com/users/datastax/received_events","type":"Organization","site_admin":false},"repo":{"id":23706552,"node_id":"MDEwOlJlcG9zaXRvcnkyMzcwNjU1Mg==","name":"nodejs-driver","full_name":"datastax/nodejs-driver","private":false,"owner":{"login":"datastax","id":573369,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3MzM2OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/573369?v=4","gravatar_id":"","url":"https://api.github.com/users/datastax","html_url":"https://github.com/datastax","followers_url":"https://api.github.com/users/datastax/followers","following_url":"https://api.github.com/users/datastax/following{/other_user}","gists_url":"https://api.github.com/users/datastax/gists{/gist_id}","starred_url":"https://api.github.com/users/datastax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datastax/subscriptions","organizations_url":"https://api.github.com/users/datastax/orgs","repos_url":"https://api.github.com/users/datastax/repos","events_url":"https://api.github.com/users/datastax/events{/privacy}","received_events_url":"https://api.github.com/users/datastax/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/datastax/nodejs-driver","description":"DataStax Node.js Driver for Apache Cassandra","fork":false,"url":"https://api.github.com/repos/datastax/nodejs-driver","forks_url":"https://api.github.com/repos/datastax/nodejs-driver/forks","keys_url":"https://api.github.com/repos/datastax/nodejs-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/datastax/nodejs-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/datastax/nodejs-driver/teams","hooks_url":"https://api.github.com/repos/datastax/nodejs-driver/hooks","issue_events_url":"https://api.github.com/repos/datastax/nodejs-driver/issues/events{/number}","events_url":"https://api.github.com/repos/datastax/nodejs-driver/events","assignees_url":"https://api.github.com/repos/datastax/nodejs-driver/assignees{/user}","branches_url":"https://api.github.com/repos/datastax/nodejs-driver/branches{/branch}","tags_url":"https://api.github.com/repos/datastax/nodejs-driver/tags","blobs_url":"https://api.github.com/repos/datastax/nodejs-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/datastax/nodejs-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/datastax/nodejs-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/datastax/nodejs-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/datastax/nodejs-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/datastax/nodejs-driver/languages","stargazers_url":"https://api.github.com/repos/datastax/nodejs-driver/stargazers","contributors_url":"https://api.github.com/repos/datastax/nodejs-driver/contributors","subscribers_url":"https://api.github.com/repos/datastax/nodejs-driver/subscribers","subscription_url":"https://api.github.com/repos/datastax/nodejs-driver/subscription","commits_url":"https://api.github.com/repos/datastax/nodejs-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/datastax/nodejs-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/datastax/nodejs-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/datastax/nodejs-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/datastax/nodejs-driver/contents/{+path}","compare_url":"https://api.github.com/repos/datastax/nodejs-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/datastax/nodejs-driver/merges","archive_url":"https://api.github.com/repos/datastax/nodejs-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/datastax/nodejs-driver/downloads","issues_url":"https://api.github.com/repos/datastax/nodejs-driver/issues{/number}","pulls_url":"https://api.github.com/repos/datastax/nodejs-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/datastax/nodejs-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/datastax/nodejs-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/datastax/nodejs-driver/labels{/name}","releases_url":"https://api.github.com/repos/datastax/nodejs-driver/releases{/id}","deployments_url":"https://api.github.com/repos/datastax/nodejs-driver/deployments","created_at":"2014-09-05T14:46:37Z","updated_at":"2018-10-29T12:31:13Z","pushed_at":"2018-10-29T12:31:09Z","git_url":"git://github.com/datastax/nodejs-driver.git","ssh_url":"git@github.com:datastax/nodejs-driver.git","clone_url":"https://github.com/datastax/nodejs-driver.git","svn_url":"https://github.com/datastax/nodejs-driver","homepage":null,"size":4290,"stargazers_count":810,"watchers_count":810,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":134,"mirror_url":null,"archived":false,"open_issues_count":12,"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":134,"open_issues":12,"watchers":810,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/datastax/nodejs-driver/pulls/289"},"html":{"href":"https://github.com/datastax/nodejs-driver/pull/289"},"issue":{"href":"https://api.github.com/repos/datastax/nodejs-driver/issues/289"},"comments":{"href":"https://api.github.com/repos/datastax/nodejs-driver/issues/289/comments"},"review_comments":{"href":"https://api.github.com/repos/datastax/nodejs-driver/pulls/289/comments"},"review_comment":{"href":"https://api.github.com/repos/datastax/nodejs-driver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/datastax/nodejs-driver/pulls/289/commits"},"statuses":{"href":"https://api.github.com/repos/datastax/nodejs-driver/statuses/9c30a9f86050b7f790f32b4e86330c49f7581fc2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jorgebay"}}