{"action":"created","comment":{"url":"https://api.github.com/repos/SeleniumHQ/selenium/pulls/comments/27627287","id":27627287,"diff_hunk":"@@ -114,18 +119,18 @@ public HttpClient getGridHttpClient(int connection_timeout, int socket_timeout)\n         .build();\n   }\n \n-  private SocketConfig createSocketConfig() {\n+  private SocketConfig createSocketConfig(int socketTimeout) {\n     return SocketConfig.custom()\n         .setSoReuseAddress(true)\n-        .setSoTimeout(TIMEOUT_THREE_HOURS)\n+        .setSoTimeout(socketTimeout > 0 ? socketTimeout : TIMEOUT_THREE_HOURS)","path":"java/client/src/org/openqa/selenium/remote/internal/HttpClientFactory.java","position":73,"original_position":73,"commit_id":"cc36b9b90311ff61f71fde1d8dbf74bff63a9ceb","original_commit_id":"cc36b9b90311ff61f71fde1d8dbf74bff63a9ceb","user":{"login":"nirvdrum","id":12584,"avatar_url":"https://avatars.githubusercontent.com/u/12584?v=3","gravatar_id":"","url":"https://api.github.com/users/nirvdrum","html_url":"https://github.com/nirvdrum","followers_url":"https://api.github.com/users/nirvdrum/followers","following_url":"https://api.github.com/users/nirvdrum/following{/other_user}","gists_url":"https://api.github.com/users/nirvdrum/gists{/gist_id}","starred_url":"https://api.github.com/users/nirvdrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nirvdrum/subscriptions","organizations_url":"https://api.github.com/users/nirvdrum/orgs","repos_url":"https://api.github.com/users/nirvdrum/repos","events_url":"https://api.github.com/users/nirvdrum/events{/privacy}","received_events_url":"https://api.github.com/users/nirvdrum/received_events","type":"User","site_admin":false},"body":"I think rather than checking `> 0`, it would make things clearer if you had a static value like `DEFAULT_TIMEOUT = -1` and then use that in `createHttpClient` and change these checks to be `socketTimeout != DEFAULT_TIMEOUT`.  Or something along those lines.","created_at":"2015-04-02T01:31:49Z","updated_at":"2015-04-02T01:31:49Z","html_url":"https://github.com/SeleniumHQ/selenium/pull/285#discussion_r27627287","pull_request_url":"https://api.github.com/repos/SeleniumHQ/selenium/pulls/285","_links":{"self":{"href":"https://api.github.com/repos/SeleniumHQ/selenium/pulls/comments/27627287"},"html":{"href":"https://github.com/SeleniumHQ/selenium/pull/285#discussion_r27627287"},"pull_request":{"href":"https://api.github.com/repos/SeleniumHQ/selenium/pulls/285"}}},"pull_request":{"url":"https://api.github.com/repos/SeleniumHQ/selenium/pulls/285","id":24497291,"html_url":"https://github.com/SeleniumHQ/selenium/pull/285","diff_url":"https://github.com/SeleniumHQ/selenium/pull/285.diff","patch_url":"https://github.com/SeleniumHQ/selenium/pull/285.patch","issue_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/285","number":285,"state":"open","locked":false,"title":"Allow clients to specify TCP timeouts","user":{"login":"disaacson","id":1521512,"avatar_url":"https://avatars.githubusercontent.com/u/1521512?v=3","gravatar_id":"","url":"https://api.github.com/users/disaacson","html_url":"https://github.com/disaacson","followers_url":"https://api.github.com/users/disaacson/followers","following_url":"https://api.github.com/users/disaacson/following{/other_user}","gists_url":"https://api.github.com/users/disaacson/gists{/gist_id}","starred_url":"https://api.github.com/users/disaacson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/disaacson/subscriptions","organizations_url":"https://api.github.com/users/disaacson/orgs","repos_url":"https://api.github.com/users/disaacson/repos","events_url":"https://api.github.com/users/disaacson/events{/privacy}","received_events_url":"https://api.github.com/users/disaacson/received_events","type":"User","site_admin":false},"body":"Clients currently are limited to a hard-coded 3 hour TCP socket read timeout. This can be extremely long for many clients, or even too short for some.\r\n\r\nThe code does not change any existing public interfaces (only adds new public methods).\r\n\r\nAn example use of the new settings is:\r\n\r\n    HttpClientFactory httpClientFactory = new HttpClientFactory(connectTimeout, socketTimeout)\r\n    HttpCommandExecutor.setHttpClientFactory(httpClientFactory)\r\n...\r\n    HttpCommandExecutor executor = new HttpCommandExecutor(seleniumUrl)\r\n    RemoteWebDriver driver = new RemoteWebDriver(executor, capabilities)","created_at":"2014-11-16T02:55:09Z","updated_at":"2015-04-02T01:31:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0ff4389d76efa2e508d4e37298d15ce45c67b53d","assignee":{"login":"nirvdrum","id":12584,"avatar_url":"https://avatars.githubusercontent.com/u/12584?v=3","gravatar_id":"","url":"https://api.github.com/users/nirvdrum","html_url":"https://github.com/nirvdrum","followers_url":"https://api.github.com/users/nirvdrum/followers","following_url":"https://api.github.com/users/nirvdrum/following{/other_user}","gists_url":"https://api.github.com/users/nirvdrum/gists{/gist_id}","starred_url":"https://api.github.com/users/nirvdrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nirvdrum/subscriptions","organizations_url":"https://api.github.com/users/nirvdrum/orgs","repos_url":"https://api.github.com/users/nirvdrum/repos","events_url":"https://api.github.com/users/nirvdrum/events{/privacy}","received_events_url":"https://api.github.com/users/nirvdrum/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/SeleniumHQ/selenium/pulls/285/commits","review_comments_url":"https://api.github.com/repos/SeleniumHQ/selenium/pulls/285/comments","review_comment_url":"https://api.github.com/repos/SeleniumHQ/selenium/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/285/comments","statuses_url":"https://api.github.com/repos/SeleniumHQ/selenium/statuses/cc36b9b90311ff61f71fde1d8dbf74bff63a9ceb","head":{"label":"disaacson:tcptimeouts","ref":"tcptimeouts","sha":"cc36b9b90311ff61f71fde1d8dbf74bff63a9ceb","user":{"login":"disaacson","id":1521512,"avatar_url":"https://avatars.githubusercontent.com/u/1521512?v=3","gravatar_id":"","url":"https://api.github.com/users/disaacson","html_url":"https://github.com/disaacson","followers_url":"https://api.github.com/users/disaacson/followers","following_url":"https://api.github.com/users/disaacson/following{/other_user}","gists_url":"https://api.github.com/users/disaacson/gists{/gist_id}","starred_url":"https://api.github.com/users/disaacson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/disaacson/subscriptions","organizations_url":"https://api.github.com/users/disaacson/orgs","repos_url":"https://api.github.com/users/disaacson/repos","events_url":"https://api.github.com/users/disaacson/events{/privacy}","received_events_url":"https://api.github.com/users/disaacson/received_events","type":"User","site_admin":false},"repo":{"id":26657968,"name":"selenium","full_name":"disaacson/selenium","owner":{"login":"disaacson","id":1521512,"avatar_url":"https://avatars.githubusercontent.com/u/1521512?v=3","gravatar_id":"","url":"https://api.github.com/users/disaacson","html_url":"https://github.com/disaacson","followers_url":"https://api.github.com/users/disaacson/followers","following_url":"https://api.github.com/users/disaacson/following{/other_user}","gists_url":"https://api.github.com/users/disaacson/gists{/gist_id}","starred_url":"https://api.github.com/users/disaacson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/disaacson/subscriptions","organizations_url":"https://api.github.com/users/disaacson/orgs","repos_url":"https://api.github.com/users/disaacson/repos","events_url":"https://api.github.com/users/disaacson/events{/privacy}","received_events_url":"https://api.github.com/users/disaacson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/disaacson/selenium","description":"A mirror of the Selenium source. Please file issues in Google Code. Also confirm you have signed the CLA (http://goo.gl/qC50R) when making a Pull Request.","fork":true,"url":"https://api.github.com/repos/disaacson/selenium","forks_url":"https://api.github.com/repos/disaacson/selenium/forks","keys_url":"https://api.github.com/repos/disaacson/selenium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/disaacson/selenium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/disaacson/selenium/teams","hooks_url":"https://api.github.com/repos/disaacson/selenium/hooks","issue_events_url":"https://api.github.com/repos/disaacson/selenium/issues/events{/number}","events_url":"https://api.github.com/repos/disaacson/selenium/events","assignees_url":"https://api.github.com/repos/disaacson/selenium/assignees{/user}","branches_url":"https://api.github.com/repos/disaacson/selenium/branches{/branch}","tags_url":"https://api.github.com/repos/disaacson/selenium/tags","blobs_url":"https://api.github.com/repos/disaacson/selenium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/disaacson/selenium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/disaacson/selenium/git/refs{/sha}","trees_url":"https://api.github.com/repos/disaacson/selenium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/disaacson/selenium/statuses/{sha}","languages_url":"https://api.github.com/repos/disaacson/selenium/languages","stargazers_url":"https://api.github.com/repos/disaacson/selenium/stargazers","contributors_url":"https://api.github.com/repos/disaacson/selenium/contributors","subscribers_url":"https://api.github.com/repos/disaacson/selenium/subscribers","subscription_url":"https://api.github.com/repos/disaacson/selenium/subscription","commits_url":"https://api.github.com/repos/disaacson/selenium/commits{/sha}","git_commits_url":"https://api.github.com/repos/disaacson/selenium/git/commits{/sha}","comments_url":"https://api.github.com/repos/disaacson/selenium/comments{/number}","issue_comment_url":"https://api.github.com/repos/disaacson/selenium/issues/comments{/number}","contents_url":"https://api.github.com/repos/disaacson/selenium/contents/{+path}","compare_url":"https://api.github.com/repos/disaacson/selenium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/disaacson/selenium/merges","archive_url":"https://api.github.com/repos/disaacson/selenium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/disaacson/selenium/downloads","issues_url":"https://api.github.com/repos/disaacson/selenium/issues{/number}","pulls_url":"https://api.github.com/repos/disaacson/selenium/pulls{/number}","milestones_url":"https://api.github.com/repos/disaacson/selenium/milestones{/number}","notifications_url":"https://api.github.com/repos/disaacson/selenium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/disaacson/selenium/labels{/name}","releases_url":"https://api.github.com/repos/disaacson/selenium/releases{/id}","created_at":"2014-11-14T21:18:25Z","updated_at":"2015-04-01T22:57:43Z","pushed_at":"2015-04-01T23:12:38Z","git_url":"git://github.com/disaacson/selenium.git","ssh_url":"git@github.com:disaacson/selenium.git","clone_url":"https://github.com/disaacson/selenium.git","svn_url":"https://github.com/disaacson/selenium","homepage":"https://code.google.com/p/selenium/","size":1107018,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"SeleniumHQ:master","ref":"master","sha":"00801a07ee9e986fc3fb9c23555d37c30afdbe39","user":{"login":"SeleniumHQ","id":983927,"avatar_url":"https://avatars.githubusercontent.com/u/983927?v=3","gravatar_id":"","url":"https://api.github.com/users/SeleniumHQ","html_url":"https://github.com/SeleniumHQ","followers_url":"https://api.github.com/users/SeleniumHQ/followers","following_url":"https://api.github.com/users/SeleniumHQ/following{/other_user}","gists_url":"https://api.github.com/users/SeleniumHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/SeleniumHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeleniumHQ/subscriptions","organizations_url":"https://api.github.com/users/SeleniumHQ/orgs","repos_url":"https://api.github.com/users/SeleniumHQ/repos","events_url":"https://api.github.com/users/SeleniumHQ/events{/privacy}","received_events_url":"https://api.github.com/users/SeleniumHQ/received_events","type":"Organization","site_admin":false},"repo":{"id":7613257,"name":"selenium","full_name":"SeleniumHQ/selenium","owner":{"login":"SeleniumHQ","id":983927,"avatar_url":"https://avatars.githubusercontent.com/u/983927?v=3","gravatar_id":"","url":"https://api.github.com/users/SeleniumHQ","html_url":"https://github.com/SeleniumHQ","followers_url":"https://api.github.com/users/SeleniumHQ/followers","following_url":"https://api.github.com/users/SeleniumHQ/following{/other_user}","gists_url":"https://api.github.com/users/SeleniumHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/SeleniumHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeleniumHQ/subscriptions","organizations_url":"https://api.github.com/users/SeleniumHQ/orgs","repos_url":"https://api.github.com/users/SeleniumHQ/repos","events_url":"https://api.github.com/users/SeleniumHQ/events{/privacy}","received_events_url":"https://api.github.com/users/SeleniumHQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SeleniumHQ/selenium","description":"A browser automation framework and ecosystem.","fork":false,"url":"https://api.github.com/repos/SeleniumHQ/selenium","forks_url":"https://api.github.com/repos/SeleniumHQ/selenium/forks","keys_url":"https://api.github.com/repos/SeleniumHQ/selenium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SeleniumHQ/selenium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SeleniumHQ/selenium/teams","hooks_url":"https://api.github.com/repos/SeleniumHQ/selenium/hooks","issue_events_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/events{/number}","events_url":"https://api.github.com/repos/SeleniumHQ/selenium/events","assignees_url":"https://api.github.com/repos/SeleniumHQ/selenium/assignees{/user}","branches_url":"https://api.github.com/repos/SeleniumHQ/selenium/branches{/branch}","tags_url":"https://api.github.com/repos/SeleniumHQ/selenium/tags","blobs_url":"https://api.github.com/repos/SeleniumHQ/selenium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SeleniumHQ/selenium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SeleniumHQ/selenium/git/refs{/sha}","trees_url":"https://api.github.com/repos/SeleniumHQ/selenium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SeleniumHQ/selenium/statuses/{sha}","languages_url":"https://api.github.com/repos/SeleniumHQ/selenium/languages","stargazers_url":"https://api.github.com/repos/SeleniumHQ/selenium/stargazers","contributors_url":"https://api.github.com/repos/SeleniumHQ/selenium/contributors","subscribers_url":"https://api.github.com/repos/SeleniumHQ/selenium/subscribers","subscription_url":"https://api.github.com/repos/SeleniumHQ/selenium/subscription","commits_url":"https://api.github.com/repos/SeleniumHQ/selenium/commits{/sha}","git_commits_url":"https://api.github.com/repos/SeleniumHQ/selenium/git/commits{/sha}","comments_url":"https://api.github.com/repos/SeleniumHQ/selenium/comments{/number}","issue_comment_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/comments{/number}","contents_url":"https://api.github.com/repos/SeleniumHQ/selenium/contents/{+path}","compare_url":"https://api.github.com/repos/SeleniumHQ/selenium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SeleniumHQ/selenium/merges","archive_url":"https://api.github.com/repos/SeleniumHQ/selenium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SeleniumHQ/selenium/downloads","issues_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues{/number}","pulls_url":"https://api.github.com/repos/SeleniumHQ/selenium/pulls{/number}","milestones_url":"https://api.github.com/repos/SeleniumHQ/selenium/milestones{/number}","notifications_url":"https://api.github.com/repos/SeleniumHQ/selenium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SeleniumHQ/selenium/labels{/name}","releases_url":"https://api.github.com/repos/SeleniumHQ/selenium/releases{/id}","created_at":"2013-01-14T21:40:56Z","updated_at":"2015-04-02T01:29:40Z","pushed_at":"2015-04-01T23:12:39Z","git_url":"git://github.com/SeleniumHQ/selenium.git","ssh_url":"git@github.com:SeleniumHQ/selenium.git","clone_url":"https://github.com/SeleniumHQ/selenium.git","svn_url":"https://github.com/SeleniumHQ/selenium","homepage":"http://seleniumhq.org/","size":1234864,"stargazers_count":814,"watchers_count":814,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":682,"mirror_url":null,"open_issues_count":47,"forks":682,"open_issues":47,"watchers":814,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SeleniumHQ/selenium/pulls/285"},"html":{"href":"https://github.com/SeleniumHQ/selenium/pull/285"},"issue":{"href":"https://api.github.com/repos/SeleniumHQ/selenium/issues/285"},"comments":{"href":"https://api.github.com/repos/SeleniumHQ/selenium/issues/285/comments"},"review_comments":{"href":"https://api.github.com/repos/SeleniumHQ/selenium/pulls/285/comments"},"review_comment":{"href":"https://api.github.com/repos/SeleniumHQ/selenium/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SeleniumHQ/selenium/pulls/285/commits"},"statuses":{"href":"https://api.github.com/repos/SeleniumHQ/selenium/statuses/cc36b9b90311ff61f71fde1d8dbf74bff63a9ceb"}}}}