{"action":"opened","number":400,"pull_request":{"url":"https://api.github.com/repos/manastech/crystal/pulls/400","id":28848131,"html_url":"https://github.com/manastech/crystal/pull/400","diff_url":"https://github.com/manastech/crystal/pull/400.diff","patch_url":"https://github.com/manastech/crystal/pull/400.patch","issue_url":"https://api.github.com/repos/manastech/crystal/issues/400","number":400,"state":"open","locked":false,"title":"Fix: leaking file descriptors on socket creation errors","user":{"login":"ysbaddaden","id":47380,"avatar_url":"https://avatars.githubusercontent.com/u/47380?v=3","gravatar_id":"","url":"https://api.github.com/users/ysbaddaden","html_url":"https://github.com/ysbaddaden","followers_url":"https://api.github.com/users/ysbaddaden/followers","following_url":"https://api.github.com/users/ysbaddaden/following{/other_user}","gists_url":"https://api.github.com/users/ysbaddaden/gists{/gist_id}","starred_url":"https://api.github.com/users/ysbaddaden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ysbaddaden/subscriptions","organizations_url":"https://api.github.com/users/ysbaddaden/orgs","repos_url":"https://api.github.com/users/ysbaddaden/repos","events_url":"https://api.github.com/users/ysbaddaden/events{/privacy}","received_events_url":"https://api.github.com/users/ysbaddaden/received_events","type":"User","site_admin":false},"body":"In Prax I try to connect to an application until it's ready, but I eventually ran out of file descriptors in a test. The culprit is `TCPSocket.new` (and alikes) that never close sockets when connect, bind or listen error! Well, my bad.","created_at":"2015-02-06T22:36:14Z","updated_at":"2015-02-06T22:36:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/manastech/crystal/pulls/400/commits","review_comments_url":"https://api.github.com/repos/manastech/crystal/pulls/400/comments","review_comment_url":"https://api.github.com/repos/manastech/crystal/pulls/comments/{number}","comments_url":"https://api.github.com/repos/manastech/crystal/issues/400/comments","statuses_url":"https://api.github.com/repos/manastech/crystal/statuses/ac0a3be5c65f5d5d25bde992807c9f799b2514b4","head":{"label":"ysbaddaden:close-sockets-on-errors","ref":"close-sockets-on-errors","sha":"ac0a3be5c65f5d5d25bde992807c9f799b2514b4","user":{"login":"ysbaddaden","id":47380,"avatar_url":"https://avatars.githubusercontent.com/u/47380?v=3","gravatar_id":"","url":"https://api.github.com/users/ysbaddaden","html_url":"https://github.com/ysbaddaden","followers_url":"https://api.github.com/users/ysbaddaden/followers","following_url":"https://api.github.com/users/ysbaddaden/following{/other_user}","gists_url":"https://api.github.com/users/ysbaddaden/gists{/gist_id}","starred_url":"https://api.github.com/users/ysbaddaden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ysbaddaden/subscriptions","organizations_url":"https://api.github.com/users/ysbaddaden/orgs","repos_url":"https://api.github.com/users/ysbaddaden/repos","events_url":"https://api.github.com/users/ysbaddaden/events{/privacy}","received_events_url":"https://api.github.com/users/ysbaddaden/received_events","type":"User","site_admin":false},"repo":{"id":28955723,"name":"crystal","full_name":"ysbaddaden/crystal","owner":{"login":"ysbaddaden","id":47380,"avatar_url":"https://avatars.githubusercontent.com/u/47380?v=3","gravatar_id":"","url":"https://api.github.com/users/ysbaddaden","html_url":"https://github.com/ysbaddaden","followers_url":"https://api.github.com/users/ysbaddaden/followers","following_url":"https://api.github.com/users/ysbaddaden/following{/other_user}","gists_url":"https://api.github.com/users/ysbaddaden/gists{/gist_id}","starred_url":"https://api.github.com/users/ysbaddaden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ysbaddaden/subscriptions","organizations_url":"https://api.github.com/users/ysbaddaden/orgs","repos_url":"https://api.github.com/users/ysbaddaden/repos","events_url":"https://api.github.com/users/ysbaddaden/events{/privacy}","received_events_url":"https://api.github.com/users/ysbaddaden/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ysbaddaden/crystal","description":"The Crystal Programming Language","fork":true,"url":"https://api.github.com/repos/ysbaddaden/crystal","forks_url":"https://api.github.com/repos/ysbaddaden/crystal/forks","keys_url":"https://api.github.com/repos/ysbaddaden/crystal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ysbaddaden/crystal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ysbaddaden/crystal/teams","hooks_url":"https://api.github.com/repos/ysbaddaden/crystal/hooks","issue_events_url":"https://api.github.com/repos/ysbaddaden/crystal/issues/events{/number}","events_url":"https://api.github.com/repos/ysbaddaden/crystal/events","assignees_url":"https://api.github.com/repos/ysbaddaden/crystal/assignees{/user}","branches_url":"https://api.github.com/repos/ysbaddaden/crystal/branches{/branch}","tags_url":"https://api.github.com/repos/ysbaddaden/crystal/tags","blobs_url":"https://api.github.com/repos/ysbaddaden/crystal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ysbaddaden/crystal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ysbaddaden/crystal/git/refs{/sha}","trees_url":"https://api.github.com/repos/ysbaddaden/crystal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ysbaddaden/crystal/statuses/{sha}","languages_url":"https://api.github.com/repos/ysbaddaden/crystal/languages","stargazers_url":"https://api.github.com/repos/ysbaddaden/crystal/stargazers","contributors_url":"https://api.github.com/repos/ysbaddaden/crystal/contributors","subscribers_url":"https://api.github.com/repos/ysbaddaden/crystal/subscribers","subscription_url":"https://api.github.com/repos/ysbaddaden/crystal/subscription","commits_url":"https://api.github.com/repos/ysbaddaden/crystal/commits{/sha}","git_commits_url":"https://api.github.com/repos/ysbaddaden/crystal/git/commits{/sha}","comments_url":"https://api.github.com/repos/ysbaddaden/crystal/comments{/number}","issue_comment_url":"https://api.github.com/repos/ysbaddaden/crystal/issues/comments/{number}","contents_url":"https://api.github.com/repos/ysbaddaden/crystal/contents/{+path}","compare_url":"https://api.github.com/repos/ysbaddaden/crystal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ysbaddaden/crystal/merges","archive_url":"https://api.github.com/repos/ysbaddaden/crystal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ysbaddaden/crystal/downloads","issues_url":"https://api.github.com/repos/ysbaddaden/crystal/issues{/number}","pulls_url":"https://api.github.com/repos/ysbaddaden/crystal/pulls{/number}","milestones_url":"https://api.github.com/repos/ysbaddaden/crystal/milestones{/number}","notifications_url":"https://api.github.com/repos/ysbaddaden/crystal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ysbaddaden/crystal/labels{/name}","releases_url":"https://api.github.com/repos/ysbaddaden/crystal/releases{/id}","created_at":"2015-01-08T08:08:48Z","updated_at":"2015-01-31T08:51:31Z","pushed_at":"2015-02-06T22:29:51Z","git_url":"git://github.com/ysbaddaden/crystal.git","ssh_url":"git@github.com:ysbaddaden/crystal.git","clone_url":"https://github.com/ysbaddaden/crystal.git","svn_url":"https://github.com/ysbaddaden/crystal","homepage":"http://crystal-lang.org","size":22480,"stargazers_count":0,"watchers_count":0,"language":"Crystal","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"manastech:master","ref":"master","sha":"bee139556e8e3aa1bc70066bc48ea29274abf294","user":{"login":"manastech","id":1354950,"avatar_url":"https://avatars.githubusercontent.com/u/1354950?v=3","gravatar_id":"","url":"https://api.github.com/users/manastech","html_url":"https://github.com/manastech","followers_url":"https://api.github.com/users/manastech/followers","following_url":"https://api.github.com/users/manastech/following{/other_user}","gists_url":"https://api.github.com/users/manastech/gists{/gist_id}","starred_url":"https://api.github.com/users/manastech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manastech/subscriptions","organizations_url":"https://api.github.com/users/manastech/orgs","repos_url":"https://api.github.com/users/manastech/repos","events_url":"https://api.github.com/users/manastech/events{/privacy}","received_events_url":"https://api.github.com/users/manastech/received_events","type":"Organization","site_admin":false},"repo":{"id":6887813,"name":"crystal","full_name":"manastech/crystal","owner":{"login":"manastech","id":1354950,"avatar_url":"https://avatars.githubusercontent.com/u/1354950?v=3","gravatar_id":"","url":"https://api.github.com/users/manastech","html_url":"https://github.com/manastech","followers_url":"https://api.github.com/users/manastech/followers","following_url":"https://api.github.com/users/manastech/following{/other_user}","gists_url":"https://api.github.com/users/manastech/gists{/gist_id}","starred_url":"https://api.github.com/users/manastech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manastech/subscriptions","organizations_url":"https://api.github.com/users/manastech/orgs","repos_url":"https://api.github.com/users/manastech/repos","events_url":"https://api.github.com/users/manastech/events{/privacy}","received_events_url":"https://api.github.com/users/manastech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/manastech/crystal","description":"The Crystal Programming Language","fork":false,"url":"https://api.github.com/repos/manastech/crystal","forks_url":"https://api.github.com/repos/manastech/crystal/forks","keys_url":"https://api.github.com/repos/manastech/crystal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manastech/crystal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manastech/crystal/teams","hooks_url":"https://api.github.com/repos/manastech/crystal/hooks","issue_events_url":"https://api.github.com/repos/manastech/crystal/issues/events{/number}","events_url":"https://api.github.com/repos/manastech/crystal/events","assignees_url":"https://api.github.com/repos/manastech/crystal/assignees{/user}","branches_url":"https://api.github.com/repos/manastech/crystal/branches{/branch}","tags_url":"https://api.github.com/repos/manastech/crystal/tags","blobs_url":"https://api.github.com/repos/manastech/crystal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manastech/crystal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manastech/crystal/git/refs{/sha}","trees_url":"https://api.github.com/repos/manastech/crystal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manastech/crystal/statuses/{sha}","languages_url":"https://api.github.com/repos/manastech/crystal/languages","stargazers_url":"https://api.github.com/repos/manastech/crystal/stargazers","contributors_url":"https://api.github.com/repos/manastech/crystal/contributors","subscribers_url":"https://api.github.com/repos/manastech/crystal/subscribers","subscription_url":"https://api.github.com/repos/manastech/crystal/subscription","commits_url":"https://api.github.com/repos/manastech/crystal/commits{/sha}","git_commits_url":"https://api.github.com/repos/manastech/crystal/git/commits{/sha}","comments_url":"https://api.github.com/repos/manastech/crystal/comments{/number}","issue_comment_url":"https://api.github.com/repos/manastech/crystal/issues/comments/{number}","contents_url":"https://api.github.com/repos/manastech/crystal/contents/{+path}","compare_url":"https://api.github.com/repos/manastech/crystal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manastech/crystal/merges","archive_url":"https://api.github.com/repos/manastech/crystal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manastech/crystal/downloads","issues_url":"https://api.github.com/repos/manastech/crystal/issues{/number}","pulls_url":"https://api.github.com/repos/manastech/crystal/pulls{/number}","milestones_url":"https://api.github.com/repos/manastech/crystal/milestones{/number}","notifications_url":"https://api.github.com/repos/manastech/crystal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manastech/crystal/labels{/name}","releases_url":"https://api.github.com/repos/manastech/crystal/releases{/id}","created_at":"2012-11-27T17:32:32Z","updated_at":"2015-02-06T22:09:06Z","pushed_at":"2015-02-06T22:09:05Z","git_url":"git://github.com/manastech/crystal.git","ssh_url":"git@github.com:manastech/crystal.git","clone_url":"https://github.com/manastech/crystal.git","svn_url":"https://github.com/manastech/crystal","homepage":"http://crystal-lang.org","size":30900,"stargazers_count":1137,"watchers_count":1137,"language":"Crystal","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":63,"mirror_url":null,"open_issues_count":74,"forks":63,"open_issues":74,"watchers":1137,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/manastech/crystal/pulls/400"},"html":{"href":"https://github.com/manastech/crystal/pull/400"},"issue":{"href":"https://api.github.com/repos/manastech/crystal/issues/400"},"comments":{"href":"https://api.github.com/repos/manastech/crystal/issues/400/comments"},"review_comments":{"href":"https://api.github.com/repos/manastech/crystal/pulls/400/comments"},"review_comment":{"href":"https://api.github.com/repos/manastech/crystal/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/manastech/crystal/pulls/400/commits"},"statuses":{"href":"https://api.github.com/repos/manastech/crystal/statuses/ac0a3be5c65f5d5d25bde992807c9f799b2514b4"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":6,"deletions":0,"changed_files":4}}