{"action":"closed","issue":{"url":"https://api.github.com/repos/briandilley/jsonrpc4j/issues/128","repository_url":"https://api.github.com/repos/briandilley/jsonrpc4j","labels_url":"https://api.github.com/repos/briandilley/jsonrpc4j/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/briandilley/jsonrpc4j/issues/128/comments","events_url":"https://api.github.com/repos/briandilley/jsonrpc4j/issues/128/events","html_url":"https://github.com/briandilley/jsonrpc4j/issues/128","id":144279306,"number":128,"title":"We call getOutputStream too earlier.","user":{"login":"lanxx019","id":2068398,"avatar_url":"https://avatars.githubusercontent.com/u/2068398?v=3","gravatar_id":"","url":"https://api.github.com/users/lanxx019","html_url":"https://github.com/lanxx019","followers_url":"https://api.github.com/users/lanxx019/followers","following_url":"https://api.github.com/users/lanxx019/following{/other_user}","gists_url":"https://api.github.com/users/lanxx019/gists{/gist_id}","starred_url":"https://api.github.com/users/lanxx019/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lanxx019/subscriptions","organizations_url":"https://api.github.com/users/lanxx019/orgs","repos_url":"https://api.github.com/users/lanxx019/repos","events_url":"https://api.github.com/users/lanxx019/events{/privacy}","received_events_url":"https://api.github.com/users/lanxx019/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-29T14:21:38Z","updated_at":"2016-03-29T15:27:38Z","closed_at":"2016-03-29T15:27:38Z","body":"Sorry, I did not get the issue tab before I created the PR. Going to copy and paste my description from PR here:\r\n\r\nInside `JsonRpcBasicServer`, we call servlet's `getOutputStream` before we construct a internal `InputStream`. The problem is if anything happens during the construction time of `InputStream`, the downstream handlers cannot use the output stream any more. We should postpone the time we call `getOutputStream` after we finish constructing the input stream."}}