{"action":"created","comment":{"url":"https://api.github.com/repos/servers-and-stuff/nelli/pulls/comments/205238069","pull_request_review_id":140469692,"id":205238069,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTIzODA2OQ==","diff_hunk":"@@ -122,94 +158,137 @@ defmodule Nelli do\n     {:ok,\n      state(\n        socket: socket,\n-       acceptors_table_id: acceptors,\n+       acceptors_tid: acceptors,\n        open_connections_count: 0,\n        options: options,\n        callback: {callback, callback_args}\n      )}\n   end\n \n+  @doc false\n+  @spec handle_call(:get_acceptors, GenServer.from(), state) :: {:reply, {:ok, [pid]}, state}\n   def handle_call(:get_acceptors, _from, state) do\n     acceptors =\n-      state(state, :acceptors_table_id)\n+      state(state, :acceptors_tid)\n       |> :ets.tab2list()\n       |> Enum.map(fn {pid} -> pid end)\n \n     {:reply, {:ok, acceptors}, state}\n   end\n \n+  @doc false\n+  @spec handle_call(:get_open_connections_count, GenServer.from(), state) ::\n+          {:reply, {:ok, open_connections_count :: non_neg_integer}, state}\n   def handle_call(:get_open_connections_count, _from, state) do\n     {:reply, {:ok, state(state, :open_connections_count)}, state}\n   end\n \n+  @doc false\n+  @spec handle_call(\n+          {:set_callback, Nelli.Callback.mod(), Nelli.Callback.args()},\n+          GenServer.from(),\n+          state\n+        ) :: {:reply, :ok, state}\n   def handle_call({:set_callback, callback, callback_args}, _from, state) do\n     :ok = callback.handle_event(:nelli_reconfigure, [], callback_args)\n     {:reply, :ok, state(state, callback: {callback, callback_args})}\n   end\n \n+  @doc false\n+  @spec handle_call(:port, GenServer.from(), unchanged_state) ::\n+          {:reply, {:ok, :inet.port_number()} | {:error, any}, unchanged_state}\n+        when unchanged_state: state\n+  def handle_call(:port, _from, state(socket: {_socket_type, socket}) = state) do\n+    {:reply, :inet.port(socket), state}\n+  end\n+\n+  @doc false\n+  @spec handle_call(:stop, GenServer.from(), state) :: {:stop, :normal, :ok, state}\n   def handle_call(:stop, _from, state) do\n     {:stop, :normal, :ok, state}\n   end\n \n+  @doc false\n+  @spec handle_cast(any, state) :: {:noreply, state}\n   def handle_cast(:accepted, state) do\n     {:noreply, start_add_acceptor(state)}\n   end\n \n+  @doc false\n   def handle_cast(msg, state) do\n+    # TODO can hurt performance, try iolists in error messages, avoid inspect","path":"lib/nelli.ex","position":198,"original_position":198,"commit_id":"4fa05bea5d89d2e649a562701d44ef92e040386b","original_commit_id":"4fa05bea5d89d2e649a562701d44ef92e040386b","user":{"login":"ebert[bot]","id":23344435,"node_id":"MDM6Qm90MjMzNDQ0MzU=","avatar_url":"https://avatars3.githubusercontent.com/in/597?v=4","gravatar_id":"","url":"https://api.github.com/users/ebert%5Bbot%5D","html_url":"https://github.com/apps/ebert","followers_url":"https://api.github.com/users/ebert%5Bbot%5D/followers","following_url":"https://api.github.com/users/ebert%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/ebert%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/ebert%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebert%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/ebert%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/ebert%5Bbot%5D/repos","events_url":"https://api.github.com/users/ebert%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/ebert%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"TODO found","created_at":"2018-07-25T19:42:09Z","updated_at":"2018-07-25T19:42:09Z","html_url":"https://github.com/servers-and-stuff/nelli/pull/2#discussion_r205238069","pull_request_url":"https://api.github.com/repos/servers-and-stuff/nelli/pulls/2","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/servers-and-stuff/nelli/pulls/comments/205238069"},"html":{"href":"https://github.com/servers-and-stuff/nelli/pull/2#discussion_r205238069"},"pull_request":{"href":"https://api.github.com/repos/servers-and-stuff/nelli/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/servers-and-stuff/nelli/pulls/2","id":203815421,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzODE1NDIx","html_url":"https://github.com/servers-and-stuff/nelli/pull/2","diff_url":"https://github.com/servers-and-stuff/nelli/pull/2.diff","patch_url":"https://github.com/servers-and-stuff/nelli/pull/2.patch","issue_url":"https://api.github.com/repos/servers-and-stuff/nelli/issues/2","number":2,"state":"open","locked":false,"title":"start adding tests","user":{"login":"kluufger","id":35971588,"node_id":"MDQ6VXNlcjM1OTcxNTg4","avatar_url":"https://avatars0.githubusercontent.com/u/35971588?v=4","gravatar_id":"","url":"https://api.github.com/users/kluufger","html_url":"https://github.com/kluufger","followers_url":"https://api.github.com/users/kluufger/followers","following_url":"https://api.github.com/users/kluufger/following{/other_user}","gists_url":"https://api.github.com/users/kluufger/gists{/gist_id}","starred_url":"https://api.github.com/users/kluufger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kluufger/subscriptions","organizations_url":"https://api.github.com/users/kluufger/orgs","repos_url":"https://api.github.com/users/kluufger/repos","events_url":"https://api.github.com/users/kluufger/events{/privacy}","received_events_url":"https://api.github.com/users/kluufger/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-25T12:07:02Z","updated_at":"2018-07-25T19:42:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f8dd0807b034fca2041e0ec86d7ea829fec996a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/servers-and-stuff/nelli/pulls/2/commits","review_comments_url":"https://api.github.com/repos/servers-and-stuff/nelli/pulls/2/comments","review_comment_url":"https://api.github.com/repos/servers-and-stuff/nelli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/servers-and-stuff/nelli/issues/2/comments","statuses_url":"https://api.github.com/repos/servers-and-stuff/nelli/statuses/4fa05bea5d89d2e649a562701d44ef92e040386b","head":{"label":"servers-and-stuff:tests","ref":"tests","sha":"4fa05bea5d89d2e649a562701d44ef92e040386b","user":{"login":"servers-and-stuff","id":38841063,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4ODQxMDYz","avatar_url":"https://avatars2.githubusercontent.com/u/38841063?v=4","gravatar_id":"","url":"https://api.github.com/users/servers-and-stuff","html_url":"https://github.com/servers-and-stuff","followers_url":"https://api.github.com/users/servers-and-stuff/followers","following_url":"https://api.github.com/users/servers-and-stuff/following{/other_user}","gists_url":"https://api.github.com/users/servers-and-stuff/gists{/gist_id}","starred_url":"https://api.github.com/users/servers-and-stuff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servers-and-stuff/subscriptions","organizations_url":"https://api.github.com/users/servers-and-stuff/orgs","repos_url":"https://api.github.com/users/servers-and-stuff/repos","events_url":"https://api.github.com/users/servers-and-stuff/events{/privacy}","received_events_url":"https://api.github.com/users/servers-and-stuff/received_events","type":"Organization","site_admin":false},"repo":{"id":131519554,"node_id":"MDEwOlJlcG9zaXRvcnkxMzE1MTk1NTQ=","name":"nelli","full_name":"servers-and-stuff/nelli","owner":{"login":"servers-and-stuff","id":38841063,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4ODQxMDYz","avatar_url":"https://avatars2.githubusercontent.com/u/38841063?v=4","gravatar_id":"","url":"https://api.github.com/users/servers-and-stuff","html_url":"https://github.com/servers-and-stuff","followers_url":"https://api.github.com/users/servers-and-stuff/followers","following_url":"https://api.github.com/users/servers-and-stuff/following{/other_user}","gists_url":"https://api.github.com/users/servers-and-stuff/gists{/gist_id}","starred_url":"https://api.github.com/users/servers-and-stuff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servers-and-stuff/subscriptions","organizations_url":"https://api.github.com/users/servers-and-stuff/orgs","repos_url":"https://api.github.com/users/servers-and-stuff/repos","events_url":"https://api.github.com/users/servers-and-stuff/events{/privacy}","received_events_url":"https://api.github.com/users/servers-and-stuff/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/servers-and-stuff/nelli","description":null,"fork":false,"url":"https://api.github.com/repos/servers-and-stuff/nelli","forks_url":"https://api.github.com/repos/servers-and-stuff/nelli/forks","keys_url":"https://api.github.com/repos/servers-and-stuff/nelli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/servers-and-stuff/nelli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/servers-and-stuff/nelli/teams","hooks_url":"https://api.github.com/repos/servers-and-stuff/nelli/hooks","issue_events_url":"https://api.github.com/repos/servers-and-stuff/nelli/issues/events{/number}","events_url":"https://api.github.com/repos/servers-and-stuff/nelli/events","assignees_url":"https://api.github.com/repos/servers-and-stuff/nelli/assignees{/user}","branches_url":"https://api.github.com/repos/servers-and-stuff/nelli/branches{/branch}","tags_url":"https://api.github.com/repos/servers-and-stuff/nelli/tags","blobs_url":"https://api.github.com/repos/servers-and-stuff/nelli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/servers-and-stuff/nelli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/servers-and-stuff/nelli/git/refs{/sha}","trees_url":"https://api.github.com/repos/servers-and-stuff/nelli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/servers-and-stuff/nelli/statuses/{sha}","languages_url":"https://api.github.com/repos/servers-and-stuff/nelli/languages","stargazers_url":"https://api.github.com/repos/servers-and-stuff/nelli/stargazers","contributors_url":"https://api.github.com/repos/servers-and-stuff/nelli/contributors","subscribers_url":"https://api.github.com/repos/servers-and-stuff/nelli/subscribers","subscription_url":"https://api.github.com/repos/servers-and-stuff/nelli/subscription","commits_url":"https://api.github.com/repos/servers-and-stuff/nelli/commits{/sha}","git_commits_url":"https://api.github.com/repos/servers-and-stuff/nelli/git/commits{/sha}","comments_url":"https://api.github.com/repos/servers-and-stuff/nelli/comments{/number}","issue_comment_url":"https://api.github.com/repos/servers-and-stuff/nelli/issues/comments{/number}","contents_url":"https://api.github.com/repos/servers-and-stuff/nelli/contents/{+path}","compare_url":"https://api.github.com/repos/servers-and-stuff/nelli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/servers-and-stuff/nelli/merges","archive_url":"https://api.github.com/repos/servers-and-stuff/nelli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/servers-and-stuff/nelli/downloads","issues_url":"https://api.github.com/repos/servers-and-stuff/nelli/issues{/number}","pulls_url":"https://api.github.com/repos/servers-and-stuff/nelli/pulls{/number}","milestones_url":"https://api.github.com/repos/servers-and-stuff/nelli/milestones{/number}","notifications_url":"https://api.github.com/repos/servers-and-stuff/nelli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/servers-and-stuff/nelli/labels{/name}","releases_url":"https://api.github.com/repos/servers-and-stuff/nelli/releases{/id}","deployments_url":"https://api.github.com/repos/servers-and-stuff/nelli/deployments","created_at":"2018-04-29T18:34:26Z","updated_at":"2018-07-25T11:54:58Z","pushed_at":"2018-07-25T19:41:35Z","git_url":"git://github.com/servers-and-stuff/nelli.git","ssh_url":"git@github.com:servers-and-stuff/nelli.git","clone_url":"https://github.com/servers-and-stuff/nelli.git","svn_url":"https://github.com/servers-and-stuff/nelli","homepage":null,"size":38,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"servers-and-stuff:master","ref":"master","sha":"2cc51e94968904369fd8beaabdd856b64994dd5c","user":{"login":"servers-and-stuff","id":38841063,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4ODQxMDYz","avatar_url":"https://avatars2.githubusercontent.com/u/38841063?v=4","gravatar_id":"","url":"https://api.github.com/users/servers-and-stuff","html_url":"https://github.com/servers-and-stuff","followers_url":"https://api.github.com/users/servers-and-stuff/followers","following_url":"https://api.github.com/users/servers-and-stuff/following{/other_user}","gists_url":"https://api.github.com/users/servers-and-stuff/gists{/gist_id}","starred_url":"https://api.github.com/users/servers-and-stuff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servers-and-stuff/subscriptions","organizations_url":"https://api.github.com/users/servers-and-stuff/orgs","repos_url":"https://api.github.com/users/servers-and-stuff/repos","events_url":"https://api.github.com/users/servers-and-stuff/events{/privacy}","received_events_url":"https://api.github.com/users/servers-and-stuff/received_events","type":"Organization","site_admin":false},"repo":{"id":131519554,"node_id":"MDEwOlJlcG9zaXRvcnkxMzE1MTk1NTQ=","name":"nelli","full_name":"servers-and-stuff/nelli","owner":{"login":"servers-and-stuff","id":38841063,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4ODQxMDYz","avatar_url":"https://avatars2.githubusercontent.com/u/38841063?v=4","gravatar_id":"","url":"https://api.github.com/users/servers-and-stuff","html_url":"https://github.com/servers-and-stuff","followers_url":"https://api.github.com/users/servers-and-stuff/followers","following_url":"https://api.github.com/users/servers-and-stuff/following{/other_user}","gists_url":"https://api.github.com/users/servers-and-stuff/gists{/gist_id}","starred_url":"https://api.github.com/users/servers-and-stuff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servers-and-stuff/subscriptions","organizations_url":"https://api.github.com/users/servers-and-stuff/orgs","repos_url":"https://api.github.com/users/servers-and-stuff/repos","events_url":"https://api.github.com/users/servers-and-stuff/events{/privacy}","received_events_url":"https://api.github.com/users/servers-and-stuff/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/servers-and-stuff/nelli","description":null,"fork":false,"url":"https://api.github.com/repos/servers-and-stuff/nelli","forks_url":"https://api.github.com/repos/servers-and-stuff/nelli/forks","keys_url":"https://api.github.com/repos/servers-and-stuff/nelli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/servers-and-stuff/nelli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/servers-and-stuff/nelli/teams","hooks_url":"https://api.github.com/repos/servers-and-stuff/nelli/hooks","issue_events_url":"https://api.github.com/repos/servers-and-stuff/nelli/issues/events{/number}","events_url":"https://api.github.com/repos/servers-and-stuff/nelli/events","assignees_url":"https://api.github.com/repos/servers-and-stuff/nelli/assignees{/user}","branches_url":"https://api.github.com/repos/servers-and-stuff/nelli/branches{/branch}","tags_url":"https://api.github.com/repos/servers-and-stuff/nelli/tags","blobs_url":"https://api.github.com/repos/servers-and-stuff/nelli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/servers-and-stuff/nelli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/servers-and-stuff/nelli/git/refs{/sha}","trees_url":"https://api.github.com/repos/servers-and-stuff/nelli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/servers-and-stuff/nelli/statuses/{sha}","languages_url":"https://api.github.com/repos/servers-and-stuff/nelli/languages","stargazers_url":"https://api.github.com/repos/servers-and-stuff/nelli/stargazers","contributors_url":"https://api.github.com/repos/servers-and-stuff/nelli/contributors","subscribers_url":"https://api.github.com/repos/servers-and-stuff/nelli/subscribers","subscription_url":"https://api.github.com/repos/servers-and-stuff/nelli/subscription","commits_url":"https://api.github.com/repos/servers-and-stuff/nelli/commits{/sha}","git_commits_url":"https://api.github.com/repos/servers-and-stuff/nelli/git/commits{/sha}","comments_url":"https://api.github.com/repos/servers-and-stuff/nelli/comments{/number}","issue_comment_url":"https://api.github.com/repos/servers-and-stuff/nelli/issues/comments{/number}","contents_url":"https://api.github.com/repos/servers-and-stuff/nelli/contents/{+path}","compare_url":"https://api.github.com/repos/servers-and-stuff/nelli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/servers-and-stuff/nelli/merges","archive_url":"https://api.github.com/repos/servers-and-stuff/nelli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/servers-and-stuff/nelli/downloads","issues_url":"https://api.github.com/repos/servers-and-stuff/nelli/issues{/number}","pulls_url":"https://api.github.com/repos/servers-and-stuff/nelli/pulls{/number}","milestones_url":"https://api.github.com/repos/servers-and-stuff/nelli/milestones{/number}","notifications_url":"https://api.github.com/repos/servers-and-stuff/nelli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/servers-and-stuff/nelli/labels{/name}","releases_url":"https://api.github.com/repos/servers-and-stuff/nelli/releases{/id}","deployments_url":"https://api.github.com/repos/servers-and-stuff/nelli/deployments","created_at":"2018-04-29T18:34:26Z","updated_at":"2018-07-25T11:54:58Z","pushed_at":"2018-07-25T19:41:35Z","git_url":"git://github.com/servers-and-stuff/nelli.git","ssh_url":"git@github.com:servers-and-stuff/nelli.git","clone_url":"https://github.com/servers-and-stuff/nelli.git","svn_url":"https://github.com/servers-and-stuff/nelli","homepage":null,"size":38,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/servers-and-stuff/nelli/pulls/2"},"html":{"href":"https://github.com/servers-and-stuff/nelli/pull/2"},"issue":{"href":"https://api.github.com/repos/servers-and-stuff/nelli/issues/2"},"comments":{"href":"https://api.github.com/repos/servers-and-stuff/nelli/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/servers-and-stuff/nelli/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/servers-and-stuff/nelli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/servers-and-stuff/nelli/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/servers-and-stuff/nelli/statuses/4fa05bea5d89d2e649a562701d44ef92e040386b"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ebert"}}