{"action":"created","comment":{"url":"https://api.github.com/repos/basho/riak-nodejs-client/pulls/comments/27732122","id":27732122,"diff_hunk":"@@ -105,6 +109,11 @@ RiakConnection.prototype._connected = function() {\n         this._connection.on('data', this._boundReceiveStartTls);\n         var command = new StartTls(function(){});\n         this.execute(command);\n+    } else if (this.healthCheck) {\n+        logger.debug('[RiakConnection] HealthCheck');\n+        this._boundReceiveHealthCheck = this._receiveHealthCheck.bind(this);","path":"lib/core/riakconnection.js","position":26,"original_position":26,"commit_id":"5a8fcb6d36a41b6e9298b52b3149170863fc3cc0","original_commit_id":"5a8fcb6d36a41b6e9298b52b3149170863fc3cc0","user":{"login":"lukebakken","id":514926,"avatar_url":"https://avatars.githubusercontent.com/u/514926?v=3","gravatar_id":"","url":"https://api.github.com/users/lukebakken","html_url":"https://github.com/lukebakken","followers_url":"https://api.github.com/users/lukebakken/followers","following_url":"https://api.github.com/users/lukebakken/following{/other_user}","gists_url":"https://api.github.com/users/lukebakken/gists{/gist_id}","starred_url":"https://api.github.com/users/lukebakken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukebakken/subscriptions","organizations_url":"https://api.github.com/users/lukebakken/orgs","repos_url":"https://api.github.com/users/lukebakken/repos","events_url":"https://api.github.com/users/lukebakken/events{/privacy}","received_events_url":"https://api.github.com/users/lukebakken/received_events","type":"User","site_admin":false},"body":"Don't forget the whole BS with `bind` and `removeListener`:\r\n\r\n```javascript\r\nthis._boundReceiveHealthCheck = this._receiveHealthCheck.bind(this);\r\nthis._connection.on('data', this._boundReceiveHealthCheck);\r\n```\r\n\r\nThen in `_receiveHealthCheck`:\r\n\r\n```javascript\r\nthis._connection.removeListener('data', this._boundReceiveHealthCheck);\r\n```","created_at":"2015-04-03T14:33:19Z","updated_at":"2015-04-03T14:33:19Z","html_url":"https://github.com/basho/riak-nodejs-client/pull/36#discussion_r27732122","pull_request_url":"https://api.github.com/repos/basho/riak-nodejs-client/pulls/36","_links":{"self":{"href":"https://api.github.com/repos/basho/riak-nodejs-client/pulls/comments/27732122"},"html":{"href":"https://github.com/basho/riak-nodejs-client/pull/36#discussion_r27732122"},"pull_request":{"href":"https://api.github.com/repos/basho/riak-nodejs-client/pulls/36"}}},"pull_request":{"url":"https://api.github.com/repos/basho/riak-nodejs-client/pulls/36","id":32553129,"html_url":"https://github.com/basho/riak-nodejs-client/pull/36","diff_url":"https://github.com/basho/riak-nodejs-client/pull/36.diff","patch_url":"https://github.com/basho/riak-nodejs-client/pull/36.patch","issue_url":"https://api.github.com/repos/basho/riak-nodejs-client/issues/36","number":36,"state":"open","locked":false,"title":"RiakNode pluggable healthcheck","user":{"login":"broach","id":1299942,"avatar_url":"https://avatars.githubusercontent.com/u/1299942?v=3","gravatar_id":"","url":"https://api.github.com/users/broach","html_url":"https://github.com/broach","followers_url":"https://api.github.com/users/broach/followers","following_url":"https://api.github.com/users/broach/following{/other_user}","gists_url":"https://api.github.com/users/broach/gists{/gist_id}","starred_url":"https://api.github.com/users/broach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broach/subscriptions","organizations_url":"https://api.github.com/users/broach/orgs","repos_url":"https://api.github.com/users/broach/repos","events_url":"https://api.github.com/users/broach/events{/privacy}","received_events_url":"https://api.github.com/users/broach/received_events","type":"User","site_admin":false},"body":"Healthcheck now plugable, defaults to a Ping. Integration tests included.\r\n\r\nAlso fixed variable name in Client.mapReduce()","created_at":"2015-04-02T21:41:01Z","updated_at":"2015-04-03T14:33:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"447e90b0342c5be2d35427eb34b9a2e934ee5b5c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/basho/riak-nodejs-client/pulls/36/commits","review_comments_url":"https://api.github.com/repos/basho/riak-nodejs-client/pulls/36/comments","review_comment_url":"https://api.github.com/repos/basho/riak-nodejs-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/basho/riak-nodejs-client/issues/36/comments","statuses_url":"https://api.github.com/repos/basho/riak-nodejs-client/statuses/5a8fcb6d36a41b6e9298b52b3149170863fc3cc0","head":{"label":"basho:jira/bar/clients-262","ref":"jira/bar/clients-262","sha":"5a8fcb6d36a41b6e9298b52b3149170863fc3cc0","user":{"login":"basho","id":176293,"avatar_url":"https://avatars.githubusercontent.com/u/176293?v=3","gravatar_id":"","url":"https://api.github.com/users/basho","html_url":"https://github.com/basho","followers_url":"https://api.github.com/users/basho/followers","following_url":"https://api.github.com/users/basho/following{/other_user}","gists_url":"https://api.github.com/users/basho/gists{/gist_id}","starred_url":"https://api.github.com/users/basho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basho/subscriptions","organizations_url":"https://api.github.com/users/basho/orgs","repos_url":"https://api.github.com/users/basho/repos","events_url":"https://api.github.com/users/basho/events{/privacy}","received_events_url":"https://api.github.com/users/basho/received_events","type":"Organization","site_admin":false},"repo":{"id":26600720,"name":"riak-nodejs-client","full_name":"basho/riak-nodejs-client","owner":{"login":"basho","id":176293,"avatar_url":"https://avatars.githubusercontent.com/u/176293?v=3","gravatar_id":"","url":"https://api.github.com/users/basho","html_url":"https://github.com/basho","followers_url":"https://api.github.com/users/basho/followers","following_url":"https://api.github.com/users/basho/following{/other_user}","gists_url":"https://api.github.com/users/basho/gists{/gist_id}","starred_url":"https://api.github.com/users/basho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basho/subscriptions","organizations_url":"https://api.github.com/users/basho/orgs","repos_url":"https://api.github.com/users/basho/repos","events_url":"https://api.github.com/users/basho/events{/privacy}","received_events_url":"https://api.github.com/users/basho/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/basho/riak-nodejs-client","description":"The official NodeJS Riak client.","fork":false,"url":"https://api.github.com/repos/basho/riak-nodejs-client","forks_url":"https://api.github.com/repos/basho/riak-nodejs-client/forks","keys_url":"https://api.github.com/repos/basho/riak-nodejs-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/basho/riak-nodejs-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/basho/riak-nodejs-client/teams","hooks_url":"https://api.github.com/repos/basho/riak-nodejs-client/hooks","issue_events_url":"https://api.github.com/repos/basho/riak-nodejs-client/issues/events{/number}","events_url":"https://api.github.com/repos/basho/riak-nodejs-client/events","assignees_url":"https://api.github.com/repos/basho/riak-nodejs-client/assignees{/user}","branches_url":"https://api.github.com/repos/basho/riak-nodejs-client/branches{/branch}","tags_url":"https://api.github.com/repos/basho/riak-nodejs-client/tags","blobs_url":"https://api.github.com/repos/basho/riak-nodejs-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/basho/riak-nodejs-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/basho/riak-nodejs-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/basho/riak-nodejs-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/basho/riak-nodejs-client/statuses/{sha}","languages_url":"https://api.github.com/repos/basho/riak-nodejs-client/languages","stargazers_url":"https://api.github.com/repos/basho/riak-nodejs-client/stargazers","contributors_url":"https://api.github.com/repos/basho/riak-nodejs-client/contributors","subscribers_url":"https://api.github.com/repos/basho/riak-nodejs-client/subscribers","subscription_url":"https://api.github.com/repos/basho/riak-nodejs-client/subscription","commits_url":"https://api.github.com/repos/basho/riak-nodejs-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/basho/riak-nodejs-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/basho/riak-nodejs-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/basho/riak-nodejs-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/basho/riak-nodejs-client/contents/{+path}","compare_url":"https://api.github.com/repos/basho/riak-nodejs-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/basho/riak-nodejs-client/merges","archive_url":"https://api.github.com/repos/basho/riak-nodejs-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/basho/riak-nodejs-client/downloads","issues_url":"https://api.github.com/repos/basho/riak-nodejs-client/issues{/number}","pulls_url":"https://api.github.com/repos/basho/riak-nodejs-client/pulls{/number}","milestones_url":"https://api.github.com/repos/basho/riak-nodejs-client/milestones{/number}","notifications_url":"https://api.github.com/repos/basho/riak-nodejs-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/basho/riak-nodejs-client/labels{/name}","releases_url":"https://api.github.com/repos/basho/riak-nodejs-client/releases{/id}","created_at":"2014-11-13T18:07:22Z","updated_at":"2015-04-03T13:02:29Z","pushed_at":"2015-04-03T14:29:31Z","git_url":"git://github.com/basho/riak-nodejs-client.git","ssh_url":"git@github.com:basho/riak-nodejs-client.git","clone_url":"https://github.com/basho/riak-nodejs-client.git","svn_url":"https://github.com/basho/riak-nodejs-client","homepage":null,"size":2057,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":9,"default_branch":"master"}},"base":{"label":"basho:master","ref":"master","sha":"ff127c42fe9286b347aba16ac60af78446b3a8b1","user":{"login":"basho","id":176293,"avatar_url":"https://avatars.githubusercontent.com/u/176293?v=3","gravatar_id":"","url":"https://api.github.com/users/basho","html_url":"https://github.com/basho","followers_url":"https://api.github.com/users/basho/followers","following_url":"https://api.github.com/users/basho/following{/other_user}","gists_url":"https://api.github.com/users/basho/gists{/gist_id}","starred_url":"https://api.github.com/users/basho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basho/subscriptions","organizations_url":"https://api.github.com/users/basho/orgs","repos_url":"https://api.github.com/users/basho/repos","events_url":"https://api.github.com/users/basho/events{/privacy}","received_events_url":"https://api.github.com/users/basho/received_events","type":"Organization","site_admin":false},"repo":{"id":26600720,"name":"riak-nodejs-client","full_name":"basho/riak-nodejs-client","owner":{"login":"basho","id":176293,"avatar_url":"https://avatars.githubusercontent.com/u/176293?v=3","gravatar_id":"","url":"https://api.github.com/users/basho","html_url":"https://github.com/basho","followers_url":"https://api.github.com/users/basho/followers","following_url":"https://api.github.com/users/basho/following{/other_user}","gists_url":"https://api.github.com/users/basho/gists{/gist_id}","starred_url":"https://api.github.com/users/basho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basho/subscriptions","organizations_url":"https://api.github.com/users/basho/orgs","repos_url":"https://api.github.com/users/basho/repos","events_url":"https://api.github.com/users/basho/events{/privacy}","received_events_url":"https://api.github.com/users/basho/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/basho/riak-nodejs-client","description":"The official NodeJS Riak client.","fork":false,"url":"https://api.github.com/repos/basho/riak-nodejs-client","forks_url":"https://api.github.com/repos/basho/riak-nodejs-client/forks","keys_url":"https://api.github.com/repos/basho/riak-nodejs-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/basho/riak-nodejs-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/basho/riak-nodejs-client/teams","hooks_url":"https://api.github.com/repos/basho/riak-nodejs-client/hooks","issue_events_url":"https://api.github.com/repos/basho/riak-nodejs-client/issues/events{/number}","events_url":"https://api.github.com/repos/basho/riak-nodejs-client/events","assignees_url":"https://api.github.com/repos/basho/riak-nodejs-client/assignees{/user}","branches_url":"https://api.github.com/repos/basho/riak-nodejs-client/branches{/branch}","tags_url":"https://api.github.com/repos/basho/riak-nodejs-client/tags","blobs_url":"https://api.github.com/repos/basho/riak-nodejs-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/basho/riak-nodejs-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/basho/riak-nodejs-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/basho/riak-nodejs-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/basho/riak-nodejs-client/statuses/{sha}","languages_url":"https://api.github.com/repos/basho/riak-nodejs-client/languages","stargazers_url":"https://api.github.com/repos/basho/riak-nodejs-client/stargazers","contributors_url":"https://api.github.com/repos/basho/riak-nodejs-client/contributors","subscribers_url":"https://api.github.com/repos/basho/riak-nodejs-client/subscribers","subscription_url":"https://api.github.com/repos/basho/riak-nodejs-client/subscription","commits_url":"https://api.github.com/repos/basho/riak-nodejs-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/basho/riak-nodejs-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/basho/riak-nodejs-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/basho/riak-nodejs-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/basho/riak-nodejs-client/contents/{+path}","compare_url":"https://api.github.com/repos/basho/riak-nodejs-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/basho/riak-nodejs-client/merges","archive_url":"https://api.github.com/repos/basho/riak-nodejs-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/basho/riak-nodejs-client/downloads","issues_url":"https://api.github.com/repos/basho/riak-nodejs-client/issues{/number}","pulls_url":"https://api.github.com/repos/basho/riak-nodejs-client/pulls{/number}","milestones_url":"https://api.github.com/repos/basho/riak-nodejs-client/milestones{/number}","notifications_url":"https://api.github.com/repos/basho/riak-nodejs-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/basho/riak-nodejs-client/labels{/name}","releases_url":"https://api.github.com/repos/basho/riak-nodejs-client/releases{/id}","created_at":"2014-11-13T18:07:22Z","updated_at":"2015-04-03T13:02:29Z","pushed_at":"2015-04-03T14:29:31Z","git_url":"git://github.com/basho/riak-nodejs-client.git","ssh_url":"git@github.com:basho/riak-nodejs-client.git","clone_url":"https://github.com/basho/riak-nodejs-client.git","svn_url":"https://github.com/basho/riak-nodejs-client","homepage":null,"size":2057,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/basho/riak-nodejs-client/pulls/36"},"html":{"href":"https://github.com/basho/riak-nodejs-client/pull/36"},"issue":{"href":"https://api.github.com/repos/basho/riak-nodejs-client/issues/36"},"comments":{"href":"https://api.github.com/repos/basho/riak-nodejs-client/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/basho/riak-nodejs-client/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/basho/riak-nodejs-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/basho/riak-nodejs-client/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/basho/riak-nodejs-client/statuses/5a8fcb6d36a41b6e9298b52b3149170863fc3cc0"}}}}