{"action":"created","issue":{"url":"https://api.github.com/repos/basho/riak-python-client/issues/400","labels_url":"https://api.github.com/repos/basho/riak-python-client/issues/400/labels{/name}","comments_url":"https://api.github.com/repos/basho/riak-python-client/issues/400/comments","events_url":"https://api.github.com/repos/basho/riak-python-client/issues/400/events","html_url":"https://github.com/basho/riak-python-client/issues/400","id":60856551,"number":400,"title":"Client can't switch to working node [JIRA: CLIENTS-254]","user":{"login":"etarasenko","id":924695,"avatar_url":"https://avatars.githubusercontent.com/u/924695?v=3","gravatar_id":"","url":"https://api.github.com/users/etarasenko","html_url":"https://github.com/etarasenko","followers_url":"https://api.github.com/users/etarasenko/followers","following_url":"https://api.github.com/users/etarasenko/following{/other_user}","gists_url":"https://api.github.com/users/etarasenko/gists{/gist_id}","starred_url":"https://api.github.com/users/etarasenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etarasenko/subscriptions","organizations_url":"https://api.github.com/users/etarasenko/orgs","repos_url":"https://api.github.com/users/etarasenko/repos","events_url":"https://api.github.com/users/etarasenko/events{/privacy}","received_events_url":"https://api.github.com/users/etarasenko/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/basho/riak-python-client/labels/JIRA:%20To%20Do","name":"JIRA: To Do","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-12T17:15:32Z","updated_at":"2015-03-19T15:56:10Z","closed_at":null,"body":"Client can't switch from broken node to working node when we using connection timeout.\r\n\r\nFor testing we need have a Riak node on localhost and any domain without Riak.\r\nThe following code should complete without exceptions.\r\n```\r\nfrom riak import RiakClient\r\n\r\n# We need check many times, because a node will be chosen randomly\r\nfor i in xrange(100):\r\n    RiakClient(\r\n        protocol='pbc',\r\n        transport_options={'timeout': 1},  # timeout in seconds!!!\r\n        nodes=[{'host': 'basho.com'}, {'host': 'localhost'}]\r\n    ).ping()\r\n```"},"comment":{"url":"https://api.github.com/repos/basho/riak-python-client/issues/comments/83642288","html_url":"https://github.com/basho/riak-python-client/issues/400#issuecomment-83642288","issue_url":"https://api.github.com/repos/basho/riak-python-client/issues/400","id":83642288,"user":{"login":"javajolt","id":2357996,"avatar_url":"https://avatars.githubusercontent.com/u/2357996?v=3","gravatar_id":"","url":"https://api.github.com/users/javajolt","html_url":"https://github.com/javajolt","followers_url":"https://api.github.com/users/javajolt/followers","following_url":"https://api.github.com/users/javajolt/following{/other_user}","gists_url":"https://api.github.com/users/javajolt/gists{/gist_id}","starred_url":"https://api.github.com/users/javajolt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javajolt/subscriptions","organizations_url":"https://api.github.com/users/javajolt/orgs","repos_url":"https://api.github.com/users/javajolt/repos","events_url":"https://api.github.com/users/javajolt/events{/privacy}","received_events_url":"https://api.github.com/users/javajolt/received_events","type":"User","site_admin":false},"created_at":"2015-03-19T15:56:10Z","updated_at":"2015-03-19T15:56:10Z","body":"Looks like you can do the same thing with Protocol Buffers:\r\n```\r\nfrom riak.transports import pbc\r\npbc.CONN_CLOSED_ERRORS += (socket.timeout, )\r\n```\r\nI'm a bit loathe to change this as the default behavior as others might be expecting an exception."}}