{"action":"created","issue":{"url":"https://api.github.com/repos/tokio-rs/tokio-core/issues/185","repository_url":"https://api.github.com/repos/tokio-rs/tokio-core","labels_url":"https://api.github.com/repos/tokio-rs/tokio-core/issues/185/labels{/name}","comments_url":"https://api.github.com/repos/tokio-rs/tokio-core/issues/185/comments","events_url":"https://api.github.com/repos/tokio-rs/tokio-core/issues/185/events","html_url":"https://github.com/tokio-rs/tokio-core/pull/185","id":211580986,"number":185,"title":"Don't fail UdpFramed due to transient errors","user":{"login":"Ralith","id":104558,"avatar_url":"https://avatars1.githubusercontent.com/u/104558?v=3","gravatar_id":"","url":"https://api.github.com/users/Ralith","html_url":"https://github.com/Ralith","followers_url":"https://api.github.com/users/Ralith/followers","following_url":"https://api.github.com/users/Ralith/following{/other_user}","gists_url":"https://api.github.com/users/Ralith/gists{/gist_id}","starred_url":"https://api.github.com/users/Ralith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ralith/subscriptions","organizations_url":"https://api.github.com/users/Ralith/orgs","repos_url":"https://api.github.com/users/Ralith/repos","events_url":"https://api.github.com/users/Ralith/events{/privacy}","received_events_url":"https://api.github.com/users/Ralith/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-03T02:50:30Z","updated_at":"2017-03-03T19:09:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tokio-rs/tokio-core/pulls/185","html_url":"https://github.com/tokio-rs/tokio-core/pull/185","diff_url":"https://github.com/tokio-rs/tokio-core/pull/185.diff","patch_url":"https://github.com/tokio-rs/tokio-core/pull/185.patch"},"body":"UDP operations have a variety of transient errors under normal operation. `UdpFramed` currently bails out if any are encountered, which is usually not desired. This change exposes `ECONNRESET` on the `Stream` and suppresses `EPERM` on the `Sink`. Writes can also return the nonfatal error `EMSGSIZE`, but I'm not sure if there's a good way to identify that error from inside tokio-core, is not transient in the sense that future transmits of the same message may succeed, and should usually be statically avoidable by not sending unreasonably large datagrams anyway.\r\n\r\nThis change also introduces an associated error type because decoder errors are not IO errors."},"comment":{"url":"https://api.github.com/repos/tokio-rs/tokio-core/issues/comments/284042855","html_url":"https://github.com/tokio-rs/tokio-core/pull/185#issuecomment-284042855","issue_url":"https://api.github.com/repos/tokio-rs/tokio-core/issues/185","id":284042855,"user":{"login":"Ralith","id":104558,"avatar_url":"https://avatars1.githubusercontent.com/u/104558?v=3","gravatar_id":"","url":"https://api.github.com/users/Ralith","html_url":"https://github.com/Ralith","followers_url":"https://api.github.com/users/Ralith/followers","following_url":"https://api.github.com/users/Ralith/following{/other_user}","gists_url":"https://api.github.com/users/Ralith/gists{/gist_id}","starred_url":"https://api.github.com/users/Ralith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ralith/subscriptions","organizations_url":"https://api.github.com/users/Ralith/orgs","repos_url":"https://api.github.com/users/Ralith/repos","events_url":"https://api.github.com/users/Ralith/events{/privacy}","received_events_url":"https://api.github.com/users/Ralith/received_events","type":"User","site_admin":false},"created_at":"2017-03-03T19:09:34Z","updated_at":"2017-03-03T19:09:34Z","body":"This isn't motivated by a desire to take care of all possible use cases. Both the `EPERM` and `ECONNRESET` situations are IMO easy for *any* UDP-based server to encounter, and handling them by aborting IO on the socket will make any code using the existing `UdpFramed` very fragile. Ignoring errors by default isn't great, I agree, but perhaps it's still better than dying whenever a client closes their socket abruptly or the host gets briefly overloaded? \"Easy mode\" to me means automatically doing what most applications require, rather than being as lossless as possible at the cost of sometimes surprising behavior.\r\n\r\nMaybe `UdpFramed` is fine as it is for the sake of just making it easy for people to prototype, but I'm leery of defaults that lead to unreliable software. Treating inherently transient UDP errors as fatal strikes me as a footgun. Nonetheless, these changes were mostly exploratory; feel free to close if you're certain the current behavior is preferred."}}
{"actor":{"display_login":"Ralith"}}