{"action":"created","comment":{"url":"https://api.github.com/repos/natsys/tempesta/pulls/comments/33500982","id":33500982,"diff_hunk":"@@ -440,6 +440,13 @@ ss_do_close(struct sock *sk)\n \t}\n }\n \n+static void\n+ss_do_close(struct sock *sk)\n+{\n+\t__ss_do_close(sk);\n+\tsock_put(sk);\n+}\n+","path":"tempesta_fw/sock.c","position":19,"original_position":19,"commit_id":"f9c51a68861dce3108f04b5353e7abf5f336624d","original_commit_id":"f9c51a68861dce3108f04b5353e7abf5f336624d","user":{"login":"krizhanovsky","id":884694,"avatar_url":"https://avatars.githubusercontent.com/u/884694?v=3","gravatar_id":"","url":"https://api.github.com/users/krizhanovsky","html_url":"https://github.com/krizhanovsky","followers_url":"https://api.github.com/users/krizhanovsky/followers","following_url":"https://api.github.com/users/krizhanovsky/following{/other_user}","gists_url":"https://api.github.com/users/krizhanovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/krizhanovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krizhanovsky/subscriptions","organizations_url":"https://api.github.com/users/krizhanovsky/orgs","repos_url":"https://api.github.com/users/krizhanovsky/repos","events_url":"https://api.github.com/users/krizhanovsky/events{/privacy}","received_events_url":"https://api.github.com/users/krizhanovsky/received_events","type":"User","site_admin":false},"body":"Why can't we just call ss_close() which does sock_put()? Why do we need 3 functions for socket closing?","created_at":"2015-06-29T19:17:46Z","updated_at":"2015-06-29T19:17:46Z","html_url":"https://github.com/natsys/tempesta/pull/133#discussion_r33500982","pull_request_url":"https://api.github.com/repos/natsys/tempesta/pulls/133","_links":{"self":{"href":"https://api.github.com/repos/natsys/tempesta/pulls/comments/33500982"},"html":{"href":"https://github.com/natsys/tempesta/pull/133#discussion_r33500982"},"pull_request":{"href":"https://api.github.com/repos/natsys/tempesta/pulls/133"}}},"pull_request":{"url":"https://api.github.com/repos/natsys/tempesta/pulls/133","id":38769392,"html_url":"https://github.com/natsys/tempesta/pull/133","diff_url":"https://github.com/natsys/tempesta/pull/133.diff","patch_url":"https://github.com/natsys/tempesta/pull/133.patch","issue_url":"https://api.github.com/repos/natsys/tempesta/issues/133","number":133,"state":"open","locked":false,"title":"Release a hold on a socket when closing it. (#46)","user":{"login":"keshonok","id":6352580,"avatar_url":"https://avatars.githubusercontent.com/u/6352580?v=3","gravatar_id":"","url":"https://api.github.com/users/keshonok","html_url":"https://github.com/keshonok","followers_url":"https://api.github.com/users/keshonok/followers","following_url":"https://api.github.com/users/keshonok/following{/other_user}","gists_url":"https://api.github.com/users/keshonok/gists{/gist_id}","starred_url":"https://api.github.com/users/keshonok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keshonok/subscriptions","organizations_url":"https://api.github.com/users/keshonok/orgs","repos_url":"https://api.github.com/users/keshonok/repos","events_url":"https://api.github.com/users/keshonok/events{/privacy}","received_events_url":"https://api.github.com/users/keshonok/received_events","type":"User","site_admin":false},"body":"In some cases sock_put() was not called. Because of that, some\r\nsockets were not closed properly: sk->sk_destruct() was not called.","created_at":"2015-06-29T12:42:32Z","updated_at":"2015-06-29T19:17:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4f97808e775e26c5a9216aa50debfce86ba5f3f5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/natsys/tempesta/pulls/133/commits","review_comments_url":"https://api.github.com/repos/natsys/tempesta/pulls/133/comments","review_comment_url":"https://api.github.com/repos/natsys/tempesta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/natsys/tempesta/issues/133/comments","statuses_url":"https://api.github.com/repos/natsys/tempesta/statuses/f9c51a68861dce3108f04b5353e7abf5f336624d","head":{"label":"natsys:ab-sk-destruct","ref":"ab-sk-destruct","sha":"f9c51a68861dce3108f04b5353e7abf5f336624d","user":{"login":"natsys","id":8489938,"avatar_url":"https://avatars.githubusercontent.com/u/8489938?v=3","gravatar_id":"","url":"https://api.github.com/users/natsys","html_url":"https://github.com/natsys","followers_url":"https://api.github.com/users/natsys/followers","following_url":"https://api.github.com/users/natsys/following{/other_user}","gists_url":"https://api.github.com/users/natsys/gists{/gist_id}","starred_url":"https://api.github.com/users/natsys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natsys/subscriptions","organizations_url":"https://api.github.com/users/natsys/orgs","repos_url":"https://api.github.com/users/natsys/repos","events_url":"https://api.github.com/users/natsys/events{/privacy}","received_events_url":"https://api.github.com/users/natsys/received_events","type":"Organization","site_admin":false},"repo":{"id":23121600,"name":"tempesta","full_name":"natsys/tempesta","owner":{"login":"natsys","id":8489938,"avatar_url":"https://avatars.githubusercontent.com/u/8489938?v=3","gravatar_id":"","url":"https://api.github.com/users/natsys","html_url":"https://github.com/natsys","followers_url":"https://api.github.com/users/natsys/followers","following_url":"https://api.github.com/users/natsys/following{/other_user}","gists_url":"https://api.github.com/users/natsys/gists{/gist_id}","starred_url":"https://api.github.com/users/natsys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natsys/subscriptions","organizations_url":"https://api.github.com/users/natsys/orgs","repos_url":"https://api.github.com/users/natsys/repos","events_url":"https://api.github.com/users/natsys/events{/privacy}","received_events_url":"https://api.github.com/users/natsys/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/natsys/tempesta","description":"High performance HTTP accelerator and firewall for WAF and DDoS prevention","fork":false,"url":"https://api.github.com/repos/natsys/tempesta","forks_url":"https://api.github.com/repos/natsys/tempesta/forks","keys_url":"https://api.github.com/repos/natsys/tempesta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/natsys/tempesta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/natsys/tempesta/teams","hooks_url":"https://api.github.com/repos/natsys/tempesta/hooks","issue_events_url":"https://api.github.com/repos/natsys/tempesta/issues/events{/number}","events_url":"https://api.github.com/repos/natsys/tempesta/events","assignees_url":"https://api.github.com/repos/natsys/tempesta/assignees{/user}","branches_url":"https://api.github.com/repos/natsys/tempesta/branches{/branch}","tags_url":"https://api.github.com/repos/natsys/tempesta/tags","blobs_url":"https://api.github.com/repos/natsys/tempesta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/natsys/tempesta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/natsys/tempesta/git/refs{/sha}","trees_url":"https://api.github.com/repos/natsys/tempesta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/natsys/tempesta/statuses/{sha}","languages_url":"https://api.github.com/repos/natsys/tempesta/languages","stargazers_url":"https://api.github.com/repos/natsys/tempesta/stargazers","contributors_url":"https://api.github.com/repos/natsys/tempesta/contributors","subscribers_url":"https://api.github.com/repos/natsys/tempesta/subscribers","subscription_url":"https://api.github.com/repos/natsys/tempesta/subscription","commits_url":"https://api.github.com/repos/natsys/tempesta/commits{/sha}","git_commits_url":"https://api.github.com/repos/natsys/tempesta/git/commits{/sha}","comments_url":"https://api.github.com/repos/natsys/tempesta/comments{/number}","issue_comment_url":"https://api.github.com/repos/natsys/tempesta/issues/comments{/number}","contents_url":"https://api.github.com/repos/natsys/tempesta/contents/{+path}","compare_url":"https://api.github.com/repos/natsys/tempesta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/natsys/tempesta/merges","archive_url":"https://api.github.com/repos/natsys/tempesta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/natsys/tempesta/downloads","issues_url":"https://api.github.com/repos/natsys/tempesta/issues{/number}","pulls_url":"https://api.github.com/repos/natsys/tempesta/pulls{/number}","milestones_url":"https://api.github.com/repos/natsys/tempesta/milestones{/number}","notifications_url":"https://api.github.com/repos/natsys/tempesta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/natsys/tempesta/labels{/name}","releases_url":"https://api.github.com/repos/natsys/tempesta/releases{/id}","created_at":"2014-08-19T18:44:05Z","updated_at":"2015-06-19T12:18:42Z","pushed_at":"2015-06-29T18:22:01Z","git_url":"git://github.com/natsys/tempesta.git","ssh_url":"git@github.com:natsys/tempesta.git","clone_url":"https://github.com/natsys/tempesta.git","svn_url":"https://github.com/natsys/tempesta","homepage":"","size":2581,"stargazers_count":53,"watchers_count":53,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":38,"forks":11,"open_issues":38,"watchers":53,"default_branch":"master"}},"base":{"label":"natsys:master","ref":"master","sha":"2cf2333797ab0baafb7b0d57a664f902e0b1e3bf","user":{"login":"natsys","id":8489938,"avatar_url":"https://avatars.githubusercontent.com/u/8489938?v=3","gravatar_id":"","url":"https://api.github.com/users/natsys","html_url":"https://github.com/natsys","followers_url":"https://api.github.com/users/natsys/followers","following_url":"https://api.github.com/users/natsys/following{/other_user}","gists_url":"https://api.github.com/users/natsys/gists{/gist_id}","starred_url":"https://api.github.com/users/natsys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natsys/subscriptions","organizations_url":"https://api.github.com/users/natsys/orgs","repos_url":"https://api.github.com/users/natsys/repos","events_url":"https://api.github.com/users/natsys/events{/privacy}","received_events_url":"https://api.github.com/users/natsys/received_events","type":"Organization","site_admin":false},"repo":{"id":23121600,"name":"tempesta","full_name":"natsys/tempesta","owner":{"login":"natsys","id":8489938,"avatar_url":"https://avatars.githubusercontent.com/u/8489938?v=3","gravatar_id":"","url":"https://api.github.com/users/natsys","html_url":"https://github.com/natsys","followers_url":"https://api.github.com/users/natsys/followers","following_url":"https://api.github.com/users/natsys/following{/other_user}","gists_url":"https://api.github.com/users/natsys/gists{/gist_id}","starred_url":"https://api.github.com/users/natsys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natsys/subscriptions","organizations_url":"https://api.github.com/users/natsys/orgs","repos_url":"https://api.github.com/users/natsys/repos","events_url":"https://api.github.com/users/natsys/events{/privacy}","received_events_url":"https://api.github.com/users/natsys/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/natsys/tempesta","description":"High performance HTTP accelerator and firewall for WAF and DDoS prevention","fork":false,"url":"https://api.github.com/repos/natsys/tempesta","forks_url":"https://api.github.com/repos/natsys/tempesta/forks","keys_url":"https://api.github.com/repos/natsys/tempesta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/natsys/tempesta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/natsys/tempesta/teams","hooks_url":"https://api.github.com/repos/natsys/tempesta/hooks","issue_events_url":"https://api.github.com/repos/natsys/tempesta/issues/events{/number}","events_url":"https://api.github.com/repos/natsys/tempesta/events","assignees_url":"https://api.github.com/repos/natsys/tempesta/assignees{/user}","branches_url":"https://api.github.com/repos/natsys/tempesta/branches{/branch}","tags_url":"https://api.github.com/repos/natsys/tempesta/tags","blobs_url":"https://api.github.com/repos/natsys/tempesta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/natsys/tempesta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/natsys/tempesta/git/refs{/sha}","trees_url":"https://api.github.com/repos/natsys/tempesta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/natsys/tempesta/statuses/{sha}","languages_url":"https://api.github.com/repos/natsys/tempesta/languages","stargazers_url":"https://api.github.com/repos/natsys/tempesta/stargazers","contributors_url":"https://api.github.com/repos/natsys/tempesta/contributors","subscribers_url":"https://api.github.com/repos/natsys/tempesta/subscribers","subscription_url":"https://api.github.com/repos/natsys/tempesta/subscription","commits_url":"https://api.github.com/repos/natsys/tempesta/commits{/sha}","git_commits_url":"https://api.github.com/repos/natsys/tempesta/git/commits{/sha}","comments_url":"https://api.github.com/repos/natsys/tempesta/comments{/number}","issue_comment_url":"https://api.github.com/repos/natsys/tempesta/issues/comments{/number}","contents_url":"https://api.github.com/repos/natsys/tempesta/contents/{+path}","compare_url":"https://api.github.com/repos/natsys/tempesta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/natsys/tempesta/merges","archive_url":"https://api.github.com/repos/natsys/tempesta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/natsys/tempesta/downloads","issues_url":"https://api.github.com/repos/natsys/tempesta/issues{/number}","pulls_url":"https://api.github.com/repos/natsys/tempesta/pulls{/number}","milestones_url":"https://api.github.com/repos/natsys/tempesta/milestones{/number}","notifications_url":"https://api.github.com/repos/natsys/tempesta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/natsys/tempesta/labels{/name}","releases_url":"https://api.github.com/repos/natsys/tempesta/releases{/id}","created_at":"2014-08-19T18:44:05Z","updated_at":"2015-06-19T12:18:42Z","pushed_at":"2015-06-29T18:22:01Z","git_url":"git://github.com/natsys/tempesta.git","ssh_url":"git@github.com:natsys/tempesta.git","clone_url":"https://github.com/natsys/tempesta.git","svn_url":"https://github.com/natsys/tempesta","homepage":"","size":2581,"stargazers_count":53,"watchers_count":53,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":38,"forks":11,"open_issues":38,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/natsys/tempesta/pulls/133"},"html":{"href":"https://github.com/natsys/tempesta/pull/133"},"issue":{"href":"https://api.github.com/repos/natsys/tempesta/issues/133"},"comments":{"href":"https://api.github.com/repos/natsys/tempesta/issues/133/comments"},"review_comments":{"href":"https://api.github.com/repos/natsys/tempesta/pulls/133/comments"},"review_comment":{"href":"https://api.github.com/repos/natsys/tempesta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/natsys/tempesta/pulls/133/commits"},"statuses":{"href":"https://api.github.com/repos/natsys/tempesta/statuses/f9c51a68861dce3108f04b5353e7abf5f336624d"}}}}