{"action":"created","comment":{"url":"https://api.github.com/repos/neumino/reqlite/pulls/comments/47933582","id":47933582,"diff_hunk":"@@ -41,12 +42,23 @@ Server.prototype._createServer = function() {\n     return;\n   }\n \n+  // connections\n+  self._connections = {};\n+\n   var server = net.createServer(function(connection) { //'connection' listener\n     new Connection(connection, self, {\n       version: self.protocolVersion,\n       authKey: self.authKey,\n       protocol: self.protocol\n     });\n+    // assign id\n+    connection.id = self.nextConnectionId++;","path":"lib/index.js","position":24,"original_position":31,"commit_id":"cb2cca9abfac3f749a7ea5f76af82477e136f2de","original_commit_id":"b40836dd4f1fa43ad45847b1e7a87200f9ca9e43","user":{"login":"yamalight","id":365944,"avatar_url":"https://avatars.githubusercontent.com/u/365944?v=3","gravatar_id":"","url":"https://api.github.com/users/yamalight","html_url":"https://github.com/yamalight","followers_url":"https://api.github.com/users/yamalight/followers","following_url":"https://api.github.com/users/yamalight/following{/other_user}","gists_url":"https://api.github.com/users/yamalight/gists{/gist_id}","starred_url":"https://api.github.com/users/yamalight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamalight/subscriptions","organizations_url":"https://api.github.com/users/yamalight/orgs","repos_url":"https://api.github.com/users/yamalight/repos","events_url":"https://api.github.com/users/yamalight/events{/privacy}","received_events_url":"https://api.github.com/users/yamalight/received_events","type":"User","site_admin":false},"body":"this makes sense, give me a sec..","created_at":"2015-12-17T17:22:02Z","updated_at":"2015-12-17T17:22:02Z","html_url":"https://github.com/neumino/reqlite/pull/66#discussion_r47933582","pull_request_url":"https://api.github.com/repos/neumino/reqlite/pulls/66","_links":{"self":{"href":"https://api.github.com/repos/neumino/reqlite/pulls/comments/47933582"},"html":{"href":"https://github.com/neumino/reqlite/pull/66#discussion_r47933582"},"pull_request":{"href":"https://api.github.com/repos/neumino/reqlite/pulls/66"}}},"pull_request":{"url":"https://api.github.com/repos/neumino/reqlite/pulls/66","id":53958135,"html_url":"https://github.com/neumino/reqlite/pull/66","diff_url":"https://github.com/neumino/reqlite/pull/66.diff","patch_url":"https://github.com/neumino/reqlite/pull/66.patch","issue_url":"https://api.github.com/repos/neumino/reqlite/issues/66","number":66,"state":"open","locked":false,"title":"Add way to stop server programmatically","user":{"login":"yamalight","id":365944,"avatar_url":"https://avatars.githubusercontent.com/u/365944?v=3","gravatar_id":"","url":"https://api.github.com/users/yamalight","html_url":"https://github.com/yamalight","followers_url":"https://api.github.com/users/yamalight/followers","following_url":"https://api.github.com/users/yamalight/following{/other_user}","gists_url":"https://api.github.com/users/yamalight/gists{/gist_id}","starred_url":"https://api.github.com/users/yamalight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamalight/subscriptions","organizations_url":"https://api.github.com/users/yamalight/orgs","repos_url":"https://api.github.com/users/yamalight/repos","events_url":"https://api.github.com/users/yamalight/events{/privacy}","received_events_url":"https://api.github.com/users/yamalight/received_events","type":"User","site_admin":false},"body":"Here's a PR for #65 \r\nI'd add unit tests too, but there seem to be no tests for lifecycle (if I missed it - please let me know, I'll add them ASAP)","created_at":"2015-12-17T10:23:49Z","updated_at":"2015-12-17T17:22:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"deefe25fb08024c8f4d72df7eb00103cd476e5d6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/neumino/reqlite/pulls/66/commits","review_comments_url":"https://api.github.com/repos/neumino/reqlite/pulls/66/comments","review_comment_url":"https://api.github.com/repos/neumino/reqlite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neumino/reqlite/issues/66/comments","statuses_url":"https://api.github.com/repos/neumino/reqlite/statuses/cb2cca9abfac3f749a7ea5f76af82477e136f2de","head":{"label":"yamalight:master","ref":"master","sha":"cb2cca9abfac3f749a7ea5f76af82477e136f2de","user":{"login":"yamalight","id":365944,"avatar_url":"https://avatars.githubusercontent.com/u/365944?v=3","gravatar_id":"","url":"https://api.github.com/users/yamalight","html_url":"https://github.com/yamalight","followers_url":"https://api.github.com/users/yamalight/followers","following_url":"https://api.github.com/users/yamalight/following{/other_user}","gists_url":"https://api.github.com/users/yamalight/gists{/gist_id}","starred_url":"https://api.github.com/users/yamalight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamalight/subscriptions","organizations_url":"https://api.github.com/users/yamalight/orgs","repos_url":"https://api.github.com/users/yamalight/repos","events_url":"https://api.github.com/users/yamalight/events{/privacy}","received_events_url":"https://api.github.com/users/yamalight/received_events","type":"User","site_admin":false},"repo":{"id":48121487,"name":"reqlite","full_name":"yamalight/reqlite","owner":{"login":"yamalight","id":365944,"avatar_url":"https://avatars.githubusercontent.com/u/365944?v=3","gravatar_id":"","url":"https://api.github.com/users/yamalight","html_url":"https://github.com/yamalight","followers_url":"https://api.github.com/users/yamalight/followers","following_url":"https://api.github.com/users/yamalight/following{/other_user}","gists_url":"https://api.github.com/users/yamalight/gists{/gist_id}","starred_url":"https://api.github.com/users/yamalight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamalight/subscriptions","organizations_url":"https://api.github.com/users/yamalight/orgs","repos_url":"https://api.github.com/users/yamalight/repos","events_url":"https://api.github.com/users/yamalight/events{/privacy}","received_events_url":"https://api.github.com/users/yamalight/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yamalight/reqlite","description":"Reqlite - RethinkDB in JavaScript","fork":true,"url":"https://api.github.com/repos/yamalight/reqlite","forks_url":"https://api.github.com/repos/yamalight/reqlite/forks","keys_url":"https://api.github.com/repos/yamalight/reqlite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yamalight/reqlite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yamalight/reqlite/teams","hooks_url":"https://api.github.com/repos/yamalight/reqlite/hooks","issue_events_url":"https://api.github.com/repos/yamalight/reqlite/issues/events{/number}","events_url":"https://api.github.com/repos/yamalight/reqlite/events","assignees_url":"https://api.github.com/repos/yamalight/reqlite/assignees{/user}","branches_url":"https://api.github.com/repos/yamalight/reqlite/branches{/branch}","tags_url":"https://api.github.com/repos/yamalight/reqlite/tags","blobs_url":"https://api.github.com/repos/yamalight/reqlite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yamalight/reqlite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yamalight/reqlite/git/refs{/sha}","trees_url":"https://api.github.com/repos/yamalight/reqlite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yamalight/reqlite/statuses/{sha}","languages_url":"https://api.github.com/repos/yamalight/reqlite/languages","stargazers_url":"https://api.github.com/repos/yamalight/reqlite/stargazers","contributors_url":"https://api.github.com/repos/yamalight/reqlite/contributors","subscribers_url":"https://api.github.com/repos/yamalight/reqlite/subscribers","subscription_url":"https://api.github.com/repos/yamalight/reqlite/subscription","commits_url":"https://api.github.com/repos/yamalight/reqlite/commits{/sha}","git_commits_url":"https://api.github.com/repos/yamalight/reqlite/git/commits{/sha}","comments_url":"https://api.github.com/repos/yamalight/reqlite/comments{/number}","issue_comment_url":"https://api.github.com/repos/yamalight/reqlite/issues/comments{/number}","contents_url":"https://api.github.com/repos/yamalight/reqlite/contents/{+path}","compare_url":"https://api.github.com/repos/yamalight/reqlite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yamalight/reqlite/merges","archive_url":"https://api.github.com/repos/yamalight/reqlite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yamalight/reqlite/downloads","issues_url":"https://api.github.com/repos/yamalight/reqlite/issues{/number}","pulls_url":"https://api.github.com/repos/yamalight/reqlite/pulls{/number}","milestones_url":"https://api.github.com/repos/yamalight/reqlite/milestones{/number}","notifications_url":"https://api.github.com/repos/yamalight/reqlite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yamalight/reqlite/labels{/name}","releases_url":"https://api.github.com/repos/yamalight/reqlite/releases{/id}","created_at":"2015-12-16T16:20:34Z","updated_at":"2015-12-16T16:20:35Z","pushed_at":"2015-12-17T17:15:10Z","git_url":"git://github.com/yamalight/reqlite.git","ssh_url":"git@github.com:yamalight/reqlite.git","clone_url":"https://github.com/yamalight/reqlite.git","svn_url":"https://github.com/yamalight/reqlite","homepage":"","size":619,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"neumino:master","ref":"master","sha":"727966818e530df400d8adb793de5a824f683025","user":{"login":"neumino","id":1461947,"avatar_url":"https://avatars.githubusercontent.com/u/1461947?v=3","gravatar_id":"","url":"https://api.github.com/users/neumino","html_url":"https://github.com/neumino","followers_url":"https://api.github.com/users/neumino/followers","following_url":"https://api.github.com/users/neumino/following{/other_user}","gists_url":"https://api.github.com/users/neumino/gists{/gist_id}","starred_url":"https://api.github.com/users/neumino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neumino/subscriptions","organizations_url":"https://api.github.com/users/neumino/orgs","repos_url":"https://api.github.com/users/neumino/repos","events_url":"https://api.github.com/users/neumino/events{/privacy}","received_events_url":"https://api.github.com/users/neumino/received_events","type":"User","site_admin":false},"repo":{"id":22053393,"name":"reqlite","full_name":"neumino/reqlite","owner":{"login":"neumino","id":1461947,"avatar_url":"https://avatars.githubusercontent.com/u/1461947?v=3","gravatar_id":"","url":"https://api.github.com/users/neumino","html_url":"https://github.com/neumino","followers_url":"https://api.github.com/users/neumino/followers","following_url":"https://api.github.com/users/neumino/following{/other_user}","gists_url":"https://api.github.com/users/neumino/gists{/gist_id}","starred_url":"https://api.github.com/users/neumino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neumino/subscriptions","organizations_url":"https://api.github.com/users/neumino/orgs","repos_url":"https://api.github.com/users/neumino/repos","events_url":"https://api.github.com/users/neumino/events{/privacy}","received_events_url":"https://api.github.com/users/neumino/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/neumino/reqlite","description":"Reqlite - RethinkDB in JavaScript","fork":false,"url":"https://api.github.com/repos/neumino/reqlite","forks_url":"https://api.github.com/repos/neumino/reqlite/forks","keys_url":"https://api.github.com/repos/neumino/reqlite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neumino/reqlite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neumino/reqlite/teams","hooks_url":"https://api.github.com/repos/neumino/reqlite/hooks","issue_events_url":"https://api.github.com/repos/neumino/reqlite/issues/events{/number}","events_url":"https://api.github.com/repos/neumino/reqlite/events","assignees_url":"https://api.github.com/repos/neumino/reqlite/assignees{/user}","branches_url":"https://api.github.com/repos/neumino/reqlite/branches{/branch}","tags_url":"https://api.github.com/repos/neumino/reqlite/tags","blobs_url":"https://api.github.com/repos/neumino/reqlite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neumino/reqlite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neumino/reqlite/git/refs{/sha}","trees_url":"https://api.github.com/repos/neumino/reqlite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neumino/reqlite/statuses/{sha}","languages_url":"https://api.github.com/repos/neumino/reqlite/languages","stargazers_url":"https://api.github.com/repos/neumino/reqlite/stargazers","contributors_url":"https://api.github.com/repos/neumino/reqlite/contributors","subscribers_url":"https://api.github.com/repos/neumino/reqlite/subscribers","subscription_url":"https://api.github.com/repos/neumino/reqlite/subscription","commits_url":"https://api.github.com/repos/neumino/reqlite/commits{/sha}","git_commits_url":"https://api.github.com/repos/neumino/reqlite/git/commits{/sha}","comments_url":"https://api.github.com/repos/neumino/reqlite/comments{/number}","issue_comment_url":"https://api.github.com/repos/neumino/reqlite/issues/comments{/number}","contents_url":"https://api.github.com/repos/neumino/reqlite/contents/{+path}","compare_url":"https://api.github.com/repos/neumino/reqlite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neumino/reqlite/merges","archive_url":"https://api.github.com/repos/neumino/reqlite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neumino/reqlite/downloads","issues_url":"https://api.github.com/repos/neumino/reqlite/issues{/number}","pulls_url":"https://api.github.com/repos/neumino/reqlite/pulls{/number}","milestones_url":"https://api.github.com/repos/neumino/reqlite/milestones{/number}","notifications_url":"https://api.github.com/repos/neumino/reqlite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neumino/reqlite/labels{/name}","releases_url":"https://api.github.com/repos/neumino/reqlite/releases{/id}","created_at":"2014-07-21T05:56:20Z","updated_at":"2015-12-17T07:23:27Z","pushed_at":"2015-12-17T17:15:10Z","git_url":"git://github.com/neumino/reqlite.git","ssh_url":"git@github.com:neumino/reqlite.git","clone_url":"https://github.com/neumino/reqlite.git","svn_url":"https://github.com/neumino/reqlite","homepage":"","size":2081,"stargazers_count":270,"watchers_count":270,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":17,"forks":19,"open_issues":17,"watchers":270,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/neumino/reqlite/pulls/66"},"html":{"href":"https://github.com/neumino/reqlite/pull/66"},"issue":{"href":"https://api.github.com/repos/neumino/reqlite/issues/66"},"comments":{"href":"https://api.github.com/repos/neumino/reqlite/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/neumino/reqlite/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/neumino/reqlite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neumino/reqlite/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/neumino/reqlite/statuses/cb2cca9abfac3f749a7ea5f76af82477e136f2de"}}}}