{"action":"created","issue":{"url":"https://api.github.com/repos/ceylon/ceylon-sdk/issues/446","repository_url":"https://api.github.com/repos/ceylon/ceylon-sdk","labels_url":"https://api.github.com/repos/ceylon/ceylon-sdk/issues/446/labels{/name}","comments_url":"https://api.github.com/repos/ceylon/ceylon-sdk/issues/446/comments","events_url":"https://api.github.com/repos/ceylon/ceylon-sdk/issues/446/events","html_url":"https://github.com/ceylon/ceylon-sdk/pull/446","id":114403237,"number":446,"title":"Add connect and read timeouts to blocking Sockets","user":{"login":"ASzc","id":2424580,"avatar_url":"https://avatars.githubusercontent.com/u/2424580?v=3","gravatar_id":"","url":"https://api.github.com/users/ASzc","html_url":"https://github.com/ASzc","followers_url":"https://api.github.com/users/ASzc/followers","following_url":"https://api.github.com/users/ASzc/following{/other_user}","gists_url":"https://api.github.com/users/ASzc/gists{/gist_id}","starred_url":"https://api.github.com/users/ASzc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ASzc/subscriptions","organizations_url":"https://api.github.com/users/ASzc/orgs","repos_url":"https://api.github.com/users/ASzc/repos","events_url":"https://api.github.com/users/ASzc/events{/privacy}","received_events_url":"https://api.github.com/users/ASzc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ceylon/ceylon-sdk/labels/high%20priority","name":"high priority","color":"fbca04"},{"url":"https://api.github.com/repos/ceylon/ceylon-sdk/labels/m-io","name":"m-io","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"ASzc","id":2424580,"avatar_url":"https://avatars.githubusercontent.com/u/2424580?v=3","gravatar_id":"","url":"https://api.github.com/users/ASzc","html_url":"https://github.com/ASzc","followers_url":"https://api.github.com/users/ASzc/followers","following_url":"https://api.github.com/users/ASzc/following{/other_user}","gists_url":"https://api.github.com/users/ASzc/gists{/gist_id}","starred_url":"https://api.github.com/users/ASzc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ASzc/subscriptions","organizations_url":"https://api.github.com/users/ASzc/orgs","repos_url":"https://api.github.com/users/ASzc/repos","events_url":"https://api.github.com/users/ASzc/events{/privacy}","received_events_url":"https://api.github.com/users/ASzc/received_events","type":"User","site_admin":false},"assignees":[{"login":"ASzc","id":2424580,"avatar_url":"https://avatars.githubusercontent.com/u/2424580?v=3","gravatar_id":"","url":"https://api.github.com/users/ASzc","html_url":"https://github.com/ASzc","followers_url":"https://api.github.com/users/ASzc/followers","following_url":"https://api.github.com/users/ASzc/following{/other_user}","gists_url":"https://api.github.com/users/ASzc/gists{/gist_id}","starred_url":"https://api.github.com/users/ASzc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ASzc/subscriptions","organizations_url":"https://api.github.com/users/ASzc/orgs","repos_url":"https://api.github.com/users/ASzc/repos","events_url":"https://api.github.com/users/ASzc/events{/privacy}","received_events_url":"https://api.github.com/users/ASzc/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/ceylon/ceylon-sdk/milestones/11","html_url":"https://github.com/ceylon/ceylon-sdk/milestones/1.2.3","labels_url":"https://api.github.com/repos/ceylon/ceylon-sdk/milestones/11/labels","id":1605767,"number":11,"title":"1.2.3","description":"","creator":{"login":"quintesse","id":778793,"avatar_url":"https://avatars.githubusercontent.com/u/778793?v=3","gravatar_id":"","url":"https://api.github.com/users/quintesse","html_url":"https://github.com/quintesse","followers_url":"https://api.github.com/users/quintesse/followers","following_url":"https://api.github.com/users/quintesse/following{/other_user}","gists_url":"https://api.github.com/users/quintesse/gists{/gist_id}","starred_url":"https://api.github.com/users/quintesse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quintesse/subscriptions","organizations_url":"https://api.github.com/users/quintesse/orgs","repos_url":"https://api.github.com/users/quintesse/repos","events_url":"https://api.github.com/users/quintesse/events{/privacy}","received_events_url":"https://api.github.com/users/quintesse/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":26,"state":"open","created_at":"2016-02-25T17:55:43Z","updated_at":"2016-08-01T16:17:49Z","due_on":null,"closed_at":null},"comments":29,"created_at":"2015-10-31T10:53:25Z","updated_at":"2016-08-02T19:24:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ceylon/ceylon-sdk/pulls/446","html_url":"https://github.com/ceylon/ceylon-sdk/pull/446","diff_url":"https://github.com/ceylon/ceylon-sdk/pull/446.diff","patch_url":"https://github.com/ceylon/ceylon-sdk/pull/446.patch"},"body":"Currently any blocking I/O with `Socket`s will block forever. This makes it very difficult to recover from the failure states that are common in networking.\r\n\r\nUnfortunately Java `Channel`s impose some strange behaviours on timeouts that need to be worked around:\r\n\r\n1. For connect timeouts to work, the underlying `Socket`'s connect method has to be called directly.\r\n2. For read timeouts to work, a parallel `ReadableByteChannel` has to be created from the underlying `Socket`'s `InputStream`, and the read timeout has to be set before the connect occurs.\r\n\r\nI would classify these as hacks, but there doesn't seem to be a cleaner way."},"comment":{"url":"https://api.github.com/repos/ceylon/ceylon-sdk/issues/comments/237015209","html_url":"https://github.com/ceylon/ceylon-sdk/pull/446#issuecomment-237015209","issue_url":"https://api.github.com/repos/ceylon/ceylon-sdk/issues/446","id":237015209,"user":{"login":"quintesse","id":778793,"avatar_url":"https://avatars.githubusercontent.com/u/778793?v=3","gravatar_id":"","url":"https://api.github.com/users/quintesse","html_url":"https://github.com/quintesse","followers_url":"https://api.github.com/users/quintesse/followers","following_url":"https://api.github.com/users/quintesse/following{/other_user}","gists_url":"https://api.github.com/users/quintesse/gists{/gist_id}","starred_url":"https://api.github.com/users/quintesse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quintesse/subscriptions","organizations_url":"https://api.github.com/users/quintesse/orgs","repos_url":"https://api.github.com/users/quintesse/repos","events_url":"https://api.github.com/users/quintesse/events{/privacy}","received_events_url":"https://api.github.com/users/quintesse/received_events","type":"User","site_admin":false},"created_at":"2016-08-02T19:24:49Z","updated_at":"2016-08-02T19:24:49Z","body":"Any progress here @ASzc ? 1.2.3 is on the horizon..."}}
{"actor":{"display_login":"quintesse"}}