{"action":"closed","number":17,"pull_request":{"url":"https://api.github.com/repos/thephpleague/statsd/pulls/17","id":29863494,"html_url":"https://github.com/thephpleague/statsd/pull/17","diff_url":"https://github.com/thephpleague/statsd/pull/17.diff","patch_url":"https://github.com/thephpleague/statsd/pull/17.patch","issue_url":"https://api.github.com/repos/thephpleague/statsd/issues/17","number":17,"state":"closed","locked":false,"title":"Added a configurable timeout value for the StatsD Client","user":{"login":"michaelmoussa","id":183833,"avatar_url":"https://avatars.githubusercontent.com/u/183833?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelmoussa","html_url":"https://github.com/michaelmoussa","followers_url":"https://api.github.com/users/michaelmoussa/followers","following_url":"https://api.github.com/users/michaelmoussa/following{/other_user}","gists_url":"https://api.github.com/users/michaelmoussa/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelmoussa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelmoussa/subscriptions","organizations_url":"https://api.github.com/users/michaelmoussa/orgs","repos_url":"https://api.github.com/users/michaelmoussa/repos","events_url":"https://api.github.com/users/michaelmoussa/events{/privacy}","received_events_url":"https://api.github.com/users/michaelmoussa/received_events","type":"User","site_admin":false},"body":"This PR adds a configurable timeout to prevent long delays when attempting to open the socket connection. If not specified, it will default to the `default_socket_timeout` setting in `php.ini`, which is the normal behavior if no `$timeout` is passed to `fsockopen(...)`.\r\n\r\nNote that while I've added tests for this, it's not possible to test that the `$timeout` value is actually being passed to `fsockopen` unless:\r\n\r\n(a) the `League\\StatsD\\Test` namespace is changed to `League\\StatsD`, which will allow me to use the \"namespace global function hack\" to verify that `fsockopen` was called with the correct timeout, or (b) Travis needs to install the [uopz](http://php.net/manual/en/book.uopz.php) Pecl module in order to \"mock\" the global `fsockopen(...)` function.\r\n\r\nI'd be happy to send a PR if you wish to go either route, but otherwise, this PR covers all new lines of code.","created_at":"2015-02-24T01:25:36Z","updated_at":"2015-03-19T17:26:21Z","closed_at":"2015-03-19T17:26:21Z","merged_at":"2015-03-19T17:26:21Z","merge_commit_sha":"6a55f35c489ade29d4fb6fcd71f2d40c5689f324","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thephpleague/statsd/pulls/17/commits","review_comments_url":"https://api.github.com/repos/thephpleague/statsd/pulls/17/comments","review_comment_url":"https://api.github.com/repos/thephpleague/statsd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thephpleague/statsd/issues/17/comments","statuses_url":"https://api.github.com/repos/thephpleague/statsd/statuses/63f99f450b3fc7b6ba240f8188ed7a8199e35353","head":{"label":"michaelmoussa:configurable-timeout","ref":"configurable-timeout","sha":"63f99f450b3fc7b6ba240f8188ed7a8199e35353","user":{"login":"michaelmoussa","id":183833,"avatar_url":"https://avatars.githubusercontent.com/u/183833?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelmoussa","html_url":"https://github.com/michaelmoussa","followers_url":"https://api.github.com/users/michaelmoussa/followers","following_url":"https://api.github.com/users/michaelmoussa/following{/other_user}","gists_url":"https://api.github.com/users/michaelmoussa/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelmoussa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelmoussa/subscriptions","organizations_url":"https://api.github.com/users/michaelmoussa/orgs","repos_url":"https://api.github.com/users/michaelmoussa/repos","events_url":"https://api.github.com/users/michaelmoussa/events{/privacy}","received_events_url":"https://api.github.com/users/michaelmoussa/received_events","type":"User","site_admin":false},"repo":{"id":31028286,"name":"statsd","full_name":"michaelmoussa/statsd","owner":{"login":"michaelmoussa","id":183833,"avatar_url":"https://avatars.githubusercontent.com/u/183833?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelmoussa","html_url":"https://github.com/michaelmoussa","followers_url":"https://api.github.com/users/michaelmoussa/followers","following_url":"https://api.github.com/users/michaelmoussa/following{/other_user}","gists_url":"https://api.github.com/users/michaelmoussa/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelmoussa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelmoussa/subscriptions","organizations_url":"https://api.github.com/users/michaelmoussa/orgs","repos_url":"https://api.github.com/users/michaelmoussa/repos","events_url":"https://api.github.com/users/michaelmoussa/events{/privacy}","received_events_url":"https://api.github.com/users/michaelmoussa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/michaelmoussa/statsd","description":"A library for working with StatsD","fork":true,"url":"https://api.github.com/repos/michaelmoussa/statsd","forks_url":"https://api.github.com/repos/michaelmoussa/statsd/forks","keys_url":"https://api.github.com/repos/michaelmoussa/statsd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/michaelmoussa/statsd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/michaelmoussa/statsd/teams","hooks_url":"https://api.github.com/repos/michaelmoussa/statsd/hooks","issue_events_url":"https://api.github.com/repos/michaelmoussa/statsd/issues/events{/number}","events_url":"https://api.github.com/repos/michaelmoussa/statsd/events","assignees_url":"https://api.github.com/repos/michaelmoussa/statsd/assignees{/user}","branches_url":"https://api.github.com/repos/michaelmoussa/statsd/branches{/branch}","tags_url":"https://api.github.com/repos/michaelmoussa/statsd/tags","blobs_url":"https://api.github.com/repos/michaelmoussa/statsd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/michaelmoussa/statsd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/michaelmoussa/statsd/git/refs{/sha}","trees_url":"https://api.github.com/repos/michaelmoussa/statsd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/michaelmoussa/statsd/statuses/{sha}","languages_url":"https://api.github.com/repos/michaelmoussa/statsd/languages","stargazers_url":"https://api.github.com/repos/michaelmoussa/statsd/stargazers","contributors_url":"https://api.github.com/repos/michaelmoussa/statsd/contributors","subscribers_url":"https://api.github.com/repos/michaelmoussa/statsd/subscribers","subscription_url":"https://api.github.com/repos/michaelmoussa/statsd/subscription","commits_url":"https://api.github.com/repos/michaelmoussa/statsd/commits{/sha}","git_commits_url":"https://api.github.com/repos/michaelmoussa/statsd/git/commits{/sha}","comments_url":"https://api.github.com/repos/michaelmoussa/statsd/comments{/number}","issue_comment_url":"https://api.github.com/repos/michaelmoussa/statsd/issues/comments{/number}","contents_url":"https://api.github.com/repos/michaelmoussa/statsd/contents/{+path}","compare_url":"https://api.github.com/repos/michaelmoussa/statsd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/michaelmoussa/statsd/merges","archive_url":"https://api.github.com/repos/michaelmoussa/statsd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/michaelmoussa/statsd/downloads","issues_url":"https://api.github.com/repos/michaelmoussa/statsd/issues{/number}","pulls_url":"https://api.github.com/repos/michaelmoussa/statsd/pulls{/number}","milestones_url":"https://api.github.com/repos/michaelmoussa/statsd/milestones{/number}","notifications_url":"https://api.github.com/repos/michaelmoussa/statsd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/michaelmoussa/statsd/labels{/name}","releases_url":"https://api.github.com/repos/michaelmoussa/statsd/releases{/id}","created_at":"2015-02-19T17:51:47Z","updated_at":"2015-02-24T00:40:46Z","pushed_at":"2015-02-24T01:33:02Z","git_url":"git://github.com/michaelmoussa/statsd.git","ssh_url":"git@github.com:michaelmoussa/statsd.git","clone_url":"https://github.com/michaelmoussa/statsd.git","svn_url":"https://github.com/michaelmoussa/statsd","homepage":"","size":223,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"thephpleague:master","ref":"master","sha":"23425dbd26056da31aab00001cfca310f338fb83","user":{"login":"thephpleague","id":527621,"avatar_url":"https://avatars.githubusercontent.com/u/527621?v=3","gravatar_id":"","url":"https://api.github.com/users/thephpleague","html_url":"https://github.com/thephpleague","followers_url":"https://api.github.com/users/thephpleague/followers","following_url":"https://api.github.com/users/thephpleague/following{/other_user}","gists_url":"https://api.github.com/users/thephpleague/gists{/gist_id}","starred_url":"https://api.github.com/users/thephpleague/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thephpleague/subscriptions","organizations_url":"https://api.github.com/users/thephpleague/orgs","repos_url":"https://api.github.com/users/thephpleague/repos","events_url":"https://api.github.com/users/thephpleague/events{/privacy}","received_events_url":"https://api.github.com/users/thephpleague/received_events","type":"Organization","site_admin":false},"repo":{"id":10663410,"name":"statsd","full_name":"thephpleague/statsd","owner":{"login":"thephpleague","id":527621,"avatar_url":"https://avatars.githubusercontent.com/u/527621?v=3","gravatar_id":"","url":"https://api.github.com/users/thephpleague","html_url":"https://github.com/thephpleague","followers_url":"https://api.github.com/users/thephpleague/followers","following_url":"https://api.github.com/users/thephpleague/following{/other_user}","gists_url":"https://api.github.com/users/thephpleague/gists{/gist_id}","starred_url":"https://api.github.com/users/thephpleague/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thephpleague/subscriptions","organizations_url":"https://api.github.com/users/thephpleague/orgs","repos_url":"https://api.github.com/users/thephpleague/repos","events_url":"https://api.github.com/users/thephpleague/events{/privacy}","received_events_url":"https://api.github.com/users/thephpleague/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thephpleague/statsd","description":"A library for working with StatsD","fork":false,"url":"https://api.github.com/repos/thephpleague/statsd","forks_url":"https://api.github.com/repos/thephpleague/statsd/forks","keys_url":"https://api.github.com/repos/thephpleague/statsd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thephpleague/statsd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thephpleague/statsd/teams","hooks_url":"https://api.github.com/repos/thephpleague/statsd/hooks","issue_events_url":"https://api.github.com/repos/thephpleague/statsd/issues/events{/number}","events_url":"https://api.github.com/repos/thephpleague/statsd/events","assignees_url":"https://api.github.com/repos/thephpleague/statsd/assignees{/user}","branches_url":"https://api.github.com/repos/thephpleague/statsd/branches{/branch}","tags_url":"https://api.github.com/repos/thephpleague/statsd/tags","blobs_url":"https://api.github.com/repos/thephpleague/statsd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thephpleague/statsd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thephpleague/statsd/git/refs{/sha}","trees_url":"https://api.github.com/repos/thephpleague/statsd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thephpleague/statsd/statuses/{sha}","languages_url":"https://api.github.com/repos/thephpleague/statsd/languages","stargazers_url":"https://api.github.com/repos/thephpleague/statsd/stargazers","contributors_url":"https://api.github.com/repos/thephpleague/statsd/contributors","subscribers_url":"https://api.github.com/repos/thephpleague/statsd/subscribers","subscription_url":"https://api.github.com/repos/thephpleague/statsd/subscription","commits_url":"https://api.github.com/repos/thephpleague/statsd/commits{/sha}","git_commits_url":"https://api.github.com/repos/thephpleague/statsd/git/commits{/sha}","comments_url":"https://api.github.com/repos/thephpleague/statsd/comments{/number}","issue_comment_url":"https://api.github.com/repos/thephpleague/statsd/issues/comments{/number}","contents_url":"https://api.github.com/repos/thephpleague/statsd/contents/{+path}","compare_url":"https://api.github.com/repos/thephpleague/statsd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thephpleague/statsd/merges","archive_url":"https://api.github.com/repos/thephpleague/statsd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thephpleague/statsd/downloads","issues_url":"https://api.github.com/repos/thephpleague/statsd/issues{/number}","pulls_url":"https://api.github.com/repos/thephpleague/statsd/pulls{/number}","milestones_url":"https://api.github.com/repos/thephpleague/statsd/milestones{/number}","notifications_url":"https://api.github.com/repos/thephpleague/statsd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thephpleague/statsd/labels{/name}","releases_url":"https://api.github.com/repos/thephpleague/statsd/releases{/id}","created_at":"2013-06-13T09:56:15Z","updated_at":"2015-03-19T03:47:22Z","pushed_at":"2015-03-19T17:26:21Z","git_url":"git://github.com/thephpleague/statsd.git","ssh_url":"git@github.com:thephpleague/statsd.git","clone_url":"https://github.com/thephpleague/statsd.git","svn_url":"https://github.com/thephpleague/statsd","homepage":"","size":524,"stargazers_count":97,"watchers_count":97,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":5,"forks":10,"open_issues":5,"watchers":97,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thephpleague/statsd/pulls/17"},"html":{"href":"https://github.com/thephpleague/statsd/pull/17"},"issue":{"href":"https://api.github.com/repos/thephpleague/statsd/issues/17"},"comments":{"href":"https://api.github.com/repos/thephpleague/statsd/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/thephpleague/statsd/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/thephpleague/statsd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thephpleague/statsd/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/thephpleague/statsd/statuses/63f99f450b3fc7b6ba240f8188ed7a8199e35353"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"philsturgeon","id":67381,"avatar_url":"https://avatars.githubusercontent.com/u/67381?v=3","gravatar_id":"","url":"https://api.github.com/users/philsturgeon","html_url":"https://github.com/philsturgeon","followers_url":"https://api.github.com/users/philsturgeon/followers","following_url":"https://api.github.com/users/philsturgeon/following{/other_user}","gists_url":"https://api.github.com/users/philsturgeon/gists{/gist_id}","starred_url":"https://api.github.com/users/philsturgeon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philsturgeon/subscriptions","organizations_url":"https://api.github.com/users/philsturgeon/orgs","repos_url":"https://api.github.com/users/philsturgeon/repos","events_url":"https://api.github.com/users/philsturgeon/events{/privacy}","received_events_url":"https://api.github.com/users/philsturgeon/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":2,"additions":30,"deletions":1,"changed_files":3}}