{"action":"opened","number":5,"pull_request":{"url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/pulls/5","id":38447667,"html_url":"https://github.com/inscitiv/ruby-ldapserver/pull/5","diff_url":"https://github.com/inscitiv/ruby-ldapserver/pull/5.diff","patch_url":"https://github.com/inscitiv/ruby-ldapserver/pull/5.patch","issue_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/issues/5","number":5,"state":"open","locked":false,"title":"Fix bug: LDAP::Server#stop raises Interrupt","user":{"login":"hanazuki","id":1135690,"avatar_url":"https://avatars.githubusercontent.com/u/1135690?v=3","gravatar_id":"","url":"https://api.github.com/users/hanazuki","html_url":"https://github.com/hanazuki","followers_url":"https://api.github.com/users/hanazuki/followers","following_url":"https://api.github.com/users/hanazuki/following{/other_user}","gists_url":"https://api.github.com/users/hanazuki/gists{/gist_id}","starred_url":"https://api.github.com/users/hanazuki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanazuki/subscriptions","organizations_url":"https://api.github.com/users/hanazuki/orgs","repos_url":"https://api.github.com/users/hanazuki/repos","events_url":"https://api.github.com/users/hanazuki/events{/privacy}","received_events_url":"https://api.github.com/users/hanazuki/received_events","type":"User","site_admin":false},"body":"`LDAP::Server#stop` raises `Interrupt` exception in the worker thread in order to break the worker loop.  In case the worker does not catch the exception, the exception is re-raised in the main thread by the succeeding `@thread.join`. We have to catch it in order not to propagate it to the caller.\r\n\r\nThe following code raises an `Interrupt` at `s.stop` in my environment:\r\n```ruby\r\ns = LDAP::Server.new(port: 0); s.run_tcpserver; s.stop\r\n```","created_at":"2015-06-24T14:27:28Z","updated_at":"2015-06-24T14:27:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/pulls/5/commits","review_comments_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/pulls/5/comments","review_comment_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/issues/5/comments","statuses_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/statuses/44a869a37b847dc54a7244c20eeb366efb7f9fb9","head":{"label":"hanazuki:fix-stop-raises-interrupt","ref":"fix-stop-raises-interrupt","sha":"44a869a37b847dc54a7244c20eeb366efb7f9fb9","user":{"login":"hanazuki","id":1135690,"avatar_url":"https://avatars.githubusercontent.com/u/1135690?v=3","gravatar_id":"","url":"https://api.github.com/users/hanazuki","html_url":"https://github.com/hanazuki","followers_url":"https://api.github.com/users/hanazuki/followers","following_url":"https://api.github.com/users/hanazuki/following{/other_user}","gists_url":"https://api.github.com/users/hanazuki/gists{/gist_id}","starred_url":"https://api.github.com/users/hanazuki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanazuki/subscriptions","organizations_url":"https://api.github.com/users/hanazuki/orgs","repos_url":"https://api.github.com/users/hanazuki/repos","events_url":"https://api.github.com/users/hanazuki/events{/privacy}","received_events_url":"https://api.github.com/users/hanazuki/received_events","type":"User","site_admin":false},"repo":{"id":37961662,"name":"ruby-ldapserver","full_name":"hanazuki/ruby-ldapserver","owner":{"login":"hanazuki","id":1135690,"avatar_url":"https://avatars.githubusercontent.com/u/1135690?v=3","gravatar_id":"","url":"https://api.github.com/users/hanazuki","html_url":"https://github.com/hanazuki","followers_url":"https://api.github.com/users/hanazuki/followers","following_url":"https://api.github.com/users/hanazuki/following{/other_user}","gists_url":"https://api.github.com/users/hanazuki/gists{/gist_id}","starred_url":"https://api.github.com/users/hanazuki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanazuki/subscriptions","organizations_url":"https://api.github.com/users/hanazuki/orgs","repos_url":"https://api.github.com/users/hanazuki/repos","events_url":"https://api.github.com/users/hanazuki/events{/privacy}","received_events_url":"https://api.github.com/users/hanazuki/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hanazuki/ruby-ldapserver","description":"","fork":true,"url":"https://api.github.com/repos/hanazuki/ruby-ldapserver","forks_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/forks","keys_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/teams","hooks_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/hooks","issue_events_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/issues/events{/number}","events_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/events","assignees_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/assignees{/user}","branches_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/branches{/branch}","tags_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/tags","blobs_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/git/refs{/sha}","trees_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/statuses/{sha}","languages_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/languages","stargazers_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/stargazers","contributors_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/contributors","subscribers_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/subscribers","subscription_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/subscription","commits_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/commits{/sha}","git_commits_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/git/commits{/sha}","comments_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/comments{/number}","issue_comment_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/issues/comments{/number}","contents_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/contents/{+path}","compare_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/merges","archive_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/downloads","issues_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/issues{/number}","pulls_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/pulls{/number}","milestones_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/milestones{/number}","notifications_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/labels{/name}","releases_url":"https://api.github.com/repos/hanazuki/ruby-ldapserver/releases{/id}","created_at":"2015-06-24T04:11:32Z","updated_at":"2015-06-24T04:11:32Z","pushed_at":"2015-06-24T14:17:15Z","git_url":"git://github.com/hanazuki/ruby-ldapserver.git","ssh_url":"git@github.com:hanazuki/ruby-ldapserver.git","clone_url":"https://github.com/hanazuki/ruby-ldapserver.git","svn_url":"https://github.com/hanazuki/ruby-ldapserver","homepage":null,"size":200,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"inscitiv:master","ref":"master","sha":"e17e094a012c550837d9bf294202566764132ab1","user":{"login":"inscitiv","id":884994,"avatar_url":"https://avatars.githubusercontent.com/u/884994?v=3","gravatar_id":"","url":"https://api.github.com/users/inscitiv","html_url":"https://github.com/inscitiv","followers_url":"https://api.github.com/users/inscitiv/followers","following_url":"https://api.github.com/users/inscitiv/following{/other_user}","gists_url":"https://api.github.com/users/inscitiv/gists{/gist_id}","starred_url":"https://api.github.com/users/inscitiv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inscitiv/subscriptions","organizations_url":"https://api.github.com/users/inscitiv/orgs","repos_url":"https://api.github.com/users/inscitiv/repos","events_url":"https://api.github.com/users/inscitiv/events{/privacy}","received_events_url":"https://api.github.com/users/inscitiv/received_events","type":"Organization","site_admin":false},"repo":{"id":8908032,"name":"ruby-ldapserver","full_name":"inscitiv/ruby-ldapserver","owner":{"login":"inscitiv","id":884994,"avatar_url":"https://avatars.githubusercontent.com/u/884994?v=3","gravatar_id":"","url":"https://api.github.com/users/inscitiv","html_url":"https://github.com/inscitiv","followers_url":"https://api.github.com/users/inscitiv/followers","following_url":"https://api.github.com/users/inscitiv/following{/other_user}","gists_url":"https://api.github.com/users/inscitiv/gists{/gist_id}","starred_url":"https://api.github.com/users/inscitiv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inscitiv/subscriptions","organizations_url":"https://api.github.com/users/inscitiv/orgs","repos_url":"https://api.github.com/users/inscitiv/repos","events_url":"https://api.github.com/users/inscitiv/events{/privacy}","received_events_url":"https://api.github.com/users/inscitiv/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/inscitiv/ruby-ldapserver","description":"","fork":false,"url":"https://api.github.com/repos/inscitiv/ruby-ldapserver","forks_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/forks","keys_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/teams","hooks_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/hooks","issue_events_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/issues/events{/number}","events_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/events","assignees_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/assignees{/user}","branches_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/branches{/branch}","tags_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/tags","blobs_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/git/refs{/sha}","trees_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/statuses/{sha}","languages_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/languages","stargazers_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/stargazers","contributors_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/contributors","subscribers_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/subscribers","subscription_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/subscription","commits_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/commits{/sha}","git_commits_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/git/commits{/sha}","comments_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/comments{/number}","issue_comment_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/issues/comments{/number}","contents_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/contents/{+path}","compare_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/merges","archive_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/downloads","issues_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/issues{/number}","pulls_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/pulls{/number}","milestones_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/milestones{/number}","notifications_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/labels{/name}","releases_url":"https://api.github.com/repos/inscitiv/ruby-ldapserver/releases{/id}","created_at":"2013-03-20T15:45:47Z","updated_at":"2015-04-02T10:53:46Z","pushed_at":"2015-06-06T16:20:47Z","git_url":"git://github.com/inscitiv/ruby-ldapserver.git","ssh_url":"git@github.com:inscitiv/ruby-ldapserver.git","clone_url":"https://github.com/inscitiv/ruby-ldapserver.git","svn_url":"https://github.com/inscitiv/ruby-ldapserver","homepage":null,"size":329,"stargazers_count":12,"watchers_count":12,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":3,"forks":7,"open_issues":3,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/inscitiv/ruby-ldapserver/pulls/5"},"html":{"href":"https://github.com/inscitiv/ruby-ldapserver/pull/5"},"issue":{"href":"https://api.github.com/repos/inscitiv/ruby-ldapserver/issues/5"},"comments":{"href":"https://api.github.com/repos/inscitiv/ruby-ldapserver/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/inscitiv/ruby-ldapserver/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/inscitiv/ruby-ldapserver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/inscitiv/ruby-ldapserver/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/inscitiv/ruby-ldapserver/statuses/44a869a37b847dc54a7244c20eeb366efb7f9fb9"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":5,"deletions":1,"changed_files":1}}