{"action":"created","issue":{"url":"https://api.github.com/repos/netty/netty/issues/4968","repository_url":"https://api.github.com/repos/netty/netty","labels_url":"https://api.github.com/repos/netty/netty/issues/4968/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty/issues/4968/comments","events_url":"https://api.github.com/repos/netty/netty/issues/4968/events","html_url":"https://github.com/netty/netty/pull/4968","id":140296515,"number":4968,"title":"EPOLL SO_LINGER=0 sends FIN+RST","user":{"login":"Scottmitch","id":7562868,"avatar_url":"https://avatars.githubusercontent.com/u/7562868?v=3","gravatar_id":"","url":"https://api.github.com/users/Scottmitch","html_url":"https://github.com/Scottmitch","followers_url":"https://api.github.com/users/Scottmitch/followers","following_url":"https://api.github.com/users/Scottmitch/following{/other_user}","gists_url":"https://api.github.com/users/Scottmitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Scottmitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Scottmitch/subscriptions","organizations_url":"https://api.github.com/users/Scottmitch/orgs","repos_url":"https://api.github.com/users/Scottmitch/repos","events_url":"https://api.github.com/users/Scottmitch/events{/privacy}","received_events_url":"https://api.github.com/users/Scottmitch/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/netty/netty/labels/defect","name":"defect","color":"e11d21"}],"state":"open","locked":false,"assignee":{"login":"Scottmitch","id":7562868,"avatar_url":"https://avatars.githubusercontent.com/u/7562868?v=3","gravatar_id":"","url":"https://api.github.com/users/Scottmitch","html_url":"https://github.com/Scottmitch","followers_url":"https://api.github.com/users/Scottmitch/followers","following_url":"https://api.github.com/users/Scottmitch/following{/other_user}","gists_url":"https://api.github.com/users/Scottmitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Scottmitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Scottmitch/subscriptions","organizations_url":"https://api.github.com/users/Scottmitch/orgs","repos_url":"https://api.github.com/users/Scottmitch/repos","events_url":"https://api.github.com/users/Scottmitch/events{/privacy}","received_events_url":"https://api.github.com/users/Scottmitch/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/netty/netty/milestones/134","html_url":"https://github.com/netty/netty/milestones/4.0.35.Final","labels_url":"https://api.github.com/repos/netty/netty/milestones/134/labels","id":1551157,"number":134,"title":"4.0.35.Final","description":"","creator":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars.githubusercontent.com/u/439362?v=3","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"open_issues":62,"closed_issues":76,"state":"open","created_at":"2016-01-29T13:17:12Z","updated_at":"2016-03-14T17:53:49Z","due_on":null,"closed_at":null},"comments":11,"created_at":"2016-03-11T21:26:39Z","updated_at":"2016-03-14T17:56:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/netty/netty/pulls/4968","html_url":"https://github.com/netty/netty/pull/4968","diff_url":"https://github.com/netty/netty/pull/4968.diff","patch_url":"https://github.com/netty/netty/pull/4968.patch"},"body":"Motivation:\r\nIf SO_LINGER is set to 0 the EPOLL transport will send a FIN followed by a RST. This is not consistent with the behavior of the NIO transport. This variation in behavior can cause protocol violations in streaming protocols (e.g. HTTP) where a FIN may be interpreted as a valid end to a data stream, but RST may be treated as the data is corrupted and should be discarded.\r\n\r\nhttps://github.com/netty/netty/issues/4170 Claims the behavior of NIO always issues a shutdown when close occurs. I could not find any evidence of this in Netty's NIO transport nor in the JDK's SocketChannel.close() implementation.\r\n\r\nModifications:\r\n- AbstractEpollChannel should be consistent with the NIO transport and not force a shutdown on every close\r\n- FileDescriptor to keep state in a consistent manner with the JDK and not allow a shutdown after a close\r\n- Unit tests for NIO and EPOLL to ensure consistent behavior\r\n\r\nResult:\r\nEPOLL is capable of sending just a RST to terminate a connection."},"comment":{"url":"https://api.github.com/repos/netty/netty/issues/comments/196440704","html_url":"https://github.com/netty/netty/pull/4968#issuecomment-196440704","issue_url":"https://api.github.com/repos/netty/netty/issues/4968","id":196440704,"user":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars.githubusercontent.com/u/439362?v=3","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T17:56:34Z","updated_at":"2016-03-14T17:56:34Z","body":"+1\n\n> Am 14.03.2016 um 17:50 schrieb Scott Mitchell <notifications@github.com>:\n> \n> I can prove it once again if you really need\n> \n> @ninja- - Yes that would be helpful. A simple unit test should be sufficient (where NIO does a shutdown and EPOLL does not).\n> \n> —\n> Reply to this email directly or view it on GitHub.\n> \n"}}