{"action":"created","issue":{"url":"https://api.github.com/repos/shazow/urllib3/issues/547","labels_url":"https://api.github.com/repos/shazow/urllib3/issues/547/labels{/name}","comments_url":"https://api.github.com/repos/shazow/urllib3/issues/547/comments","events_url":"https://api.github.com/repos/shazow/urllib3/issues/547/events","html_url":"https://github.com/shazow/urllib3/issues/547","id":57044201,"number":547,"title":"Unexpected retry type required for connection failure on LAN","user":{"login":"malc0","id":7490588,"avatar_url":"https://avatars.githubusercontent.com/u/7490588?v=3","gravatar_id":"","url":"https://api.github.com/users/malc0","html_url":"https://github.com/malc0","followers_url":"https://api.github.com/users/malc0/followers","following_url":"https://api.github.com/users/malc0/following{/other_user}","gists_url":"https://api.github.com/users/malc0/gists{/gist_id}","starred_url":"https://api.github.com/users/malc0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malc0/subscriptions","organizations_url":"https://api.github.com/users/malc0/orgs","repos_url":"https://api.github.com/users/malc0/repos","events_url":"https://api.github.com/users/malc0/events{/privacy}","received_events_url":"https://api.github.com/users/malc0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-02-09T15:21:59Z","updated_at":"2015-02-10T01:55:22Z","closed_at":null,"body":"Retry-attempts to connect to a disconnected local machine, without setting a timeout, are affected by the 'read' parameter, rather than the 'connect' parameter.  This is confusing, as it does not seem to be in compliance with the documentation, nor is it the same behaviour as when either a) using a connection timeout, or b) attempting to connect to a non-existant remote machine, both of which are correctly affected by the 'connect' parameter.\r\n\r\nLooking at the back-trace I suspect this is because the reported OSError is treated as a ProtocolError, rather than a problem establishing the connection: ```ProtocolError('Connection aborted.', OSError(113, 'No route to host'))```\r\n\r\nUsing the latest requests release (2.5.1) the problem is evident using:\r\n```python\r\nimport requests\r\ns = requests.Session()\r\nretry = requests.packages.urllib3.util.Retry(total=None, connect=10, read=2, redirect=5, backoff_factor=0.1)\r\ns.mount('http://', requests.adapters.HTTPAdapter(max_retries=retry))\r\ns.get('http://129.169.154.100/foo.html')\r\n```\r\n(129.169.154.0/24 being my local subnet).\r\n\r\n\r\n<bountysource-plugin>\r\n\r\n---\r\nWant to back this issue? **[Place a bounty on it!](https://www.bountysource.com/issues/8422872-unexpected-retry-type-required-for-connection-failure-on-lan?utm_campaign=plugin&utm_content=tracker%2F192525&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F192525&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/shazow/urllib3/issues/comments/73630293","html_url":"https://github.com/shazow/urllib3/issues/547#issuecomment-73630293","issue_url":"https://api.github.com/repos/shazow/urllib3/issues/547","id":73630293,"user":{"login":"shazow","id":6292,"avatar_url":"https://avatars.githubusercontent.com/u/6292?v=3","gravatar_id":"","url":"https://api.github.com/users/shazow","html_url":"https://github.com/shazow","followers_url":"https://api.github.com/users/shazow/followers","following_url":"https://api.github.com/users/shazow/following{/other_user}","gists_url":"https://api.github.com/users/shazow/gists{/gist_id}","starred_url":"https://api.github.com/users/shazow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shazow/subscriptions","organizations_url":"https://api.github.com/users/shazow/orgs","repos_url":"https://api.github.com/users/shazow/repos","events_url":"https://api.github.com/users/shazow/events{/privacy}","received_events_url":"https://api.github.com/users/shazow/received_events","type":"User","site_admin":false},"created_at":"2015-02-10T01:55:22Z","updated_at":"2015-02-10T01:55:22Z","body":"I'm open to reviewing PRs. I spent 2-3 full time days on this during my grant last summer and hit a bunch of dead ends with ambiguity of state. I thought we spoke during that period and agreed with the conclusion, but maybe I'm mistaken."}}