{"action":"created","comment":{"url":"https://api.github.com/repos/netty/netty/pulls/comments/63276789","id":63276789,"diff_hunk":"@@ -143,24 +156,82 @@ protected int doReadBytes(ByteBuf buf) throws Exception {\n     }\n \n     @Override\n-    public ChannelFuture shutdownOutput(final ChannelPromise future) {\n+    public ChannelFuture shutdownOutput(final ChannelPromise promise) {\n+        EventLoop loop = eventLoop();\n+        if (loop.inEventLoop()) {\n+            try {\n+                socket.shutdownOutput();\n+                promise.setSuccess();\n+            } catch (Throwable t) {\n+                promise.setFailure(t);\n+            }","path":"transport/src/main/java/io/netty/channel/socket/oio/OioSocketChannel.java","position":66,"original_position":66,"commit_id":"9c4ddd592578b8da504731337ba6097caa5fd36a","original_commit_id":"3633aafc3de6b76c618830e4cdb2e29297f5c538","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},"body":"Sgtm I will factor it out","created_at":"2016-05-14T14:14:08Z","updated_at":"2016-05-14T14:14:08Z","html_url":"https://github.com/netty/netty/pull/5192#discussion_r63276789","pull_request_url":"https://api.github.com/repos/netty/netty/pulls/5192","_links":{"self":{"href":"https://api.github.com/repos/netty/netty/pulls/comments/63276789"},"html":{"href":"https://github.com/netty/netty/pull/5192#discussion_r63276789"},"pull_request":{"href":"https://api.github.com/repos/netty/netty/pulls/5192"}}},"pull_request":{"url":"https://api.github.com/repos/netty/netty/pulls/5192","id":68455257,"html_url":"https://github.com/netty/netty/pull/5192","diff_url":"https://github.com/netty/netty/pull/5192.diff","patch_url":"https://github.com/netty/netty/pull/5192.patch","issue_url":"https://api.github.com/repos/netty/netty/issues/5192","number":5192,"state":"open","locked":false,"title":"DuplexChannel to support shutdownInput","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},"body":"Motivation:\r\nThe DuplexChannel is currently incomplete and only supports shutting down the output side of a channel. This interface should also support shutting down the input side of the channel.\r\n\r\nModifications:\r\n- Add shutdownInput and shutdown methods to the DuplexChannel interface\r\n- Remove state in NIO and OIO for tracking input being shutdown independent of the underlying transport's socket type. Tracking the state independently may lead to inconsistent state.\r\n\r\nResult:\r\nDuplexChannel supports shutting down the input side of the channel\r\nFixes https://github.com/netty/netty/issues/5175","created_at":"2016-04-30T02:37:08Z","updated_at":"2016-05-14T14:14:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ff7f40306fdee921fe85c16945bf9ddc84880979","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/84","html_url":"https://github.com/netty/netty/milestones/4.1.0.Final","labels_url":"https://api.github.com/repos/netty/netty/milestones/84/labels","id":561880,"number":84,"title":"4.1.0.Final","description":null,"creator":{"login":"trustin","id":173918,"avatar_url":"https://avatars.githubusercontent.com/u/173918?v=3","gravatar_id":"","url":"https://api.github.com/users/trustin","html_url":"https://github.com/trustin","followers_url":"https://api.github.com/users/trustin/followers","following_url":"https://api.github.com/users/trustin/following{/other_user}","gists_url":"https://api.github.com/users/trustin/gists{/gist_id}","starred_url":"https://api.github.com/users/trustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trustin/subscriptions","organizations_url":"https://api.github.com/users/trustin/orgs","repos_url":"https://api.github.com/users/trustin/repos","events_url":"https://api.github.com/users/trustin/events{/privacy}","received_events_url":"https://api.github.com/users/trustin/received_events","type":"User","site_admin":false},"open_issues":46,"closed_issues":48,"state":"open","created_at":"2014-02-07T08:42:42Z","updated_at":"2016-05-14T05:23:00Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/netty/netty/pulls/5192/commits","review_comments_url":"https://api.github.com/repos/netty/netty/pulls/5192/comments","review_comment_url":"https://api.github.com/repos/netty/netty/pulls/comments{/number}","comments_url":"https://api.github.com/repos/netty/netty/issues/5192/comments","statuses_url":"https://api.github.com/repos/netty/netty/statuses/9c4ddd592578b8da504731337ba6097caa5fd36a","head":{"label":"Scottmitch:shutdown_input","ref":"shutdown_input","sha":"9c4ddd592578b8da504731337ba6097caa5fd36a","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},"repo":{"id":21251366,"name":"netty","full_name":"Scottmitch/netty","owner":{"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},"private":false,"html_url":"https://github.com/Scottmitch/netty","description":"Netty project - an event-driven asynchronous network application framework","fork":true,"url":"https://api.github.com/repos/Scottmitch/netty","forks_url":"https://api.github.com/repos/Scottmitch/netty/forks","keys_url":"https://api.github.com/repos/Scottmitch/netty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Scottmitch/netty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Scottmitch/netty/teams","hooks_url":"https://api.github.com/repos/Scottmitch/netty/hooks","issue_events_url":"https://api.github.com/repos/Scottmitch/netty/issues/events{/number}","events_url":"https://api.github.com/repos/Scottmitch/netty/events","assignees_url":"https://api.github.com/repos/Scottmitch/netty/assignees{/user}","branches_url":"https://api.github.com/repos/Scottmitch/netty/branches{/branch}","tags_url":"https://api.github.com/repos/Scottmitch/netty/tags","blobs_url":"https://api.github.com/repos/Scottmitch/netty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Scottmitch/netty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Scottmitch/netty/git/refs{/sha}","trees_url":"https://api.github.com/repos/Scottmitch/netty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Scottmitch/netty/statuses/{sha}","languages_url":"https://api.github.com/repos/Scottmitch/netty/languages","stargazers_url":"https://api.github.com/repos/Scottmitch/netty/stargazers","contributors_url":"https://api.github.com/repos/Scottmitch/netty/contributors","subscribers_url":"https://api.github.com/repos/Scottmitch/netty/subscribers","subscription_url":"https://api.github.com/repos/Scottmitch/netty/subscription","commits_url":"https://api.github.com/repos/Scottmitch/netty/commits{/sha}","git_commits_url":"https://api.github.com/repos/Scottmitch/netty/git/commits{/sha}","comments_url":"https://api.github.com/repos/Scottmitch/netty/comments{/number}","issue_comment_url":"https://api.github.com/repos/Scottmitch/netty/issues/comments{/number}","contents_url":"https://api.github.com/repos/Scottmitch/netty/contents/{+path}","compare_url":"https://api.github.com/repos/Scottmitch/netty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Scottmitch/netty/merges","archive_url":"https://api.github.com/repos/Scottmitch/netty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Scottmitch/netty/downloads","issues_url":"https://api.github.com/repos/Scottmitch/netty/issues{/number}","pulls_url":"https://api.github.com/repos/Scottmitch/netty/pulls{/number}","milestones_url":"https://api.github.com/repos/Scottmitch/netty/milestones{/number}","notifications_url":"https://api.github.com/repos/Scottmitch/netty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Scottmitch/netty/labels{/name}","releases_url":"https://api.github.com/repos/Scottmitch/netty/releases{/id}","deployments_url":"https://api.github.com/repos/Scottmitch/netty/deployments","created_at":"2014-06-26T18:56:19Z","updated_at":"2016-02-08T18:45:50Z","pushed_at":"2016-05-14T01:17:39Z","git_url":"git://github.com/Scottmitch/netty.git","ssh_url":"git@github.com:Scottmitch/netty.git","clone_url":"https://github.com/Scottmitch/netty.git","svn_url":"https://github.com/Scottmitch/netty","homepage":"http://netty.io/","size":39969,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"netty:4.1","ref":"4.1","sha":"4d2e91a10dd6b2b3a1ec25a26e2f64d9c4212fe9","user":{"login":"netty","id":473791,"avatar_url":"https://avatars.githubusercontent.com/u/473791?v=3","gravatar_id":"","url":"https://api.github.com/users/netty","html_url":"https://github.com/netty","followers_url":"https://api.github.com/users/netty/followers","following_url":"https://api.github.com/users/netty/following{/other_user}","gists_url":"https://api.github.com/users/netty/gists{/gist_id}","starred_url":"https://api.github.com/users/netty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netty/subscriptions","organizations_url":"https://api.github.com/users/netty/orgs","repos_url":"https://api.github.com/users/netty/repos","events_url":"https://api.github.com/users/netty/events{/privacy}","received_events_url":"https://api.github.com/users/netty/received_events","type":"Organization","site_admin":false},"repo":{"id":1064563,"name":"netty","full_name":"netty/netty","owner":{"login":"netty","id":473791,"avatar_url":"https://avatars.githubusercontent.com/u/473791?v=3","gravatar_id":"","url":"https://api.github.com/users/netty","html_url":"https://github.com/netty","followers_url":"https://api.github.com/users/netty/followers","following_url":"https://api.github.com/users/netty/following{/other_user}","gists_url":"https://api.github.com/users/netty/gists{/gist_id}","starred_url":"https://api.github.com/users/netty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netty/subscriptions","organizations_url":"https://api.github.com/users/netty/orgs","repos_url":"https://api.github.com/users/netty/repos","events_url":"https://api.github.com/users/netty/events{/privacy}","received_events_url":"https://api.github.com/users/netty/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/netty/netty","description":"Netty project - an event-driven asynchronous network application framework","fork":false,"url":"https://api.github.com/repos/netty/netty","forks_url":"https://api.github.com/repos/netty/netty/forks","keys_url":"https://api.github.com/repos/netty/netty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/netty/netty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/netty/netty/teams","hooks_url":"https://api.github.com/repos/netty/netty/hooks","issue_events_url":"https://api.github.com/repos/netty/netty/issues/events{/number}","events_url":"https://api.github.com/repos/netty/netty/events","assignees_url":"https://api.github.com/repos/netty/netty/assignees{/user}","branches_url":"https://api.github.com/repos/netty/netty/branches{/branch}","tags_url":"https://api.github.com/repos/netty/netty/tags","blobs_url":"https://api.github.com/repos/netty/netty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/netty/netty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/netty/netty/git/refs{/sha}","trees_url":"https://api.github.com/repos/netty/netty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/netty/netty/statuses/{sha}","languages_url":"https://api.github.com/repos/netty/netty/languages","stargazers_url":"https://api.github.com/repos/netty/netty/stargazers","contributors_url":"https://api.github.com/repos/netty/netty/contributors","subscribers_url":"https://api.github.com/repos/netty/netty/subscribers","subscription_url":"https://api.github.com/repos/netty/netty/subscription","commits_url":"https://api.github.com/repos/netty/netty/commits{/sha}","git_commits_url":"https://api.github.com/repos/netty/netty/git/commits{/sha}","comments_url":"https://api.github.com/repos/netty/netty/comments{/number}","issue_comment_url":"https://api.github.com/repos/netty/netty/issues/comments{/number}","contents_url":"https://api.github.com/repos/netty/netty/contents/{+path}","compare_url":"https://api.github.com/repos/netty/netty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/netty/netty/merges","archive_url":"https://api.github.com/repos/netty/netty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/netty/netty/downloads","issues_url":"https://api.github.com/repos/netty/netty/issues{/number}","pulls_url":"https://api.github.com/repos/netty/netty/pulls{/number}","milestones_url":"https://api.github.com/repos/netty/netty/milestones{/number}","notifications_url":"https://api.github.com/repos/netty/netty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/netty/netty/labels{/name}","releases_url":"https://api.github.com/repos/netty/netty/releases{/id}","deployments_url":"https://api.github.com/repos/netty/netty/deployments","created_at":"2010-11-09T09:22:21Z","updated_at":"2016-05-14T13:12:39Z","pushed_at":"2016-05-14T05:24:46Z","git_url":"git://github.com/netty/netty.git","ssh_url":"git@github.com:netty/netty.git","clone_url":"https://github.com/netty/netty.git","svn_url":"https://github.com/netty/netty","homepage":"http://netty.io/","size":67273,"stargazers_count":6816,"watchers_count":6816,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3462,"mirror_url":null,"open_issues_count":323,"forks":3462,"open_issues":323,"watchers":6816,"default_branch":"4.1"}},"_links":{"self":{"href":"https://api.github.com/repos/netty/netty/pulls/5192"},"html":{"href":"https://github.com/netty/netty/pull/5192"},"issue":{"href":"https://api.github.com/repos/netty/netty/issues/5192"},"comments":{"href":"https://api.github.com/repos/netty/netty/issues/5192/comments"},"review_comments":{"href":"https://api.github.com/repos/netty/netty/pulls/5192/comments"},"review_comment":{"href":"https://api.github.com/repos/netty/netty/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/netty/netty/pulls/5192/commits"},"statuses":{"href":"https://api.github.com/repos/netty/netty/statuses/9c4ddd592578b8da504731337ba6097caa5fd36a"}}}}