{"action":"created","issue":{"url":"https://api.github.com/repos/mpenet/jet/issues/39","repository_url":"https://api.github.com/repos/mpenet/jet","labels_url":"https://api.github.com/repos/mpenet/jet/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/mpenet/jet/issues/39/comments","events_url":"https://api.github.com/repos/mpenet/jet/issues/39/events","html_url":"https://github.com/mpenet/jet/issues/39","id":154921948,"number":39,"title":"repeatedly reading from a server connected channel results in repeated input","user":{"login":"nicferrier","id":245513,"avatar_url":"https://avatars.githubusercontent.com/u/245513?v=3","gravatar_id":"","url":"https://api.github.com/users/nicferrier","html_url":"https://github.com/nicferrier","followers_url":"https://api.github.com/users/nicferrier/followers","following_url":"https://api.github.com/users/nicferrier/following{/other_user}","gists_url":"https://api.github.com/users/nicferrier/gists{/gist_id}","starred_url":"https://api.github.com/users/nicferrier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicferrier/subscriptions","organizations_url":"https://api.github.com/users/nicferrier/orgs","repos_url":"https://api.github.com/users/nicferrier/repos","events_url":"https://api.github.com/users/nicferrier/events{/privacy}","received_events_url":"https://api.github.com/users/nicferrier/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-15T18:16:55Z","updated_at":"2016-05-16T17:28:02Z","closed_at":null,"body":"Here's my jetty handler:\r\n\r\n```\r\n(ring-params/wrap-params\r\n    (fn [request-msg]\r\n      (let [params (:params request-msg)\r\n            fake-body (format\r\n                       \"<h1>%s</h1>%s%s\"\r\n                       (str/upper-case (:uri request-msg))\r\n                       (get params \"param\" \"\")\r\n                       (-> request-msg :headers (get \"x-header\" \"\")))\r\n            body-channel (a/chan)\r\n            response-channel (a/chan)]\r\n        (timbre/debug \"fake-jetty-handlers http-request> \" (:uri request-msg) request-msg)\r\n        (timbre/debug \"fake-jetty-handlers http-request params>\" params)\r\n        (timbre/debug \"fake-jetty-handlers http-request headers>\" (:headers request-msg))\r\n        (a/go\r\n          (a/>! body-channel fake-body)\r\n          (a/close! body-channel))\r\n        (a/go\r\n          (a/>! response-channel \r\n                {:status 200\r\n                 :header {:content-type \"text/html\"}\r\n                 :body body-channel}))\r\n        response-channel)))\r\n```\r\n\r\nand here's my test:\r\n\r\n```\r\n(a/go\r\n  (let [data {:form-params {:a 1 :param \"hello!\"}\r\n                          :headers {\"x-header\" \"some data\"}}\r\n         con-ch (http/post client \"http://localhost:8020/blah/blah\" data)\r\n         response (a/<! con-ch)\r\n         body-ch (:body response)\r\n         body (a/<! body-ch)]\r\n         (timbre/info \"result of further body get>\" (a/<! body-ch))\r\n         (timbre/info \"result of further body get 2>\" (a/<! body-ch))\r\n```\r\n\r\nAnd I'm getting a repeated line from the second and 3rd channel gets:\r\n\r\n```\r\n[02:11:33] client has body> <h1>/BLAH/BLAH</h1>some data\r\n[02:11:33] result of further body get> <h1>/BLAH/BLAH</h1>some data\r\n[02:11:33] result of further body get 2> <h1>/BLAH/BLAH</h1>some data\r\n```\r\n\r\nWhat???"},"comment":{"url":"https://api.github.com/repos/mpenet/jet/issues/comments/219488569","html_url":"https://github.com/mpenet/jet/issues/39#issuecomment-219488569","issue_url":"https://api.github.com/repos/mpenet/jet/issues/39","id":219488569,"user":{"login":"mpenet","id":106390,"avatar_url":"https://avatars.githubusercontent.com/u/106390?v=3","gravatar_id":"","url":"https://api.github.com/users/mpenet","html_url":"https://github.com/mpenet","followers_url":"https://api.github.com/users/mpenet/followers","following_url":"https://api.github.com/users/mpenet/following{/other_user}","gists_url":"https://api.github.com/users/mpenet/gists{/gist_id}","starred_url":"https://api.github.com/users/mpenet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpenet/subscriptions","organizations_url":"https://api.github.com/users/mpenet/orgs","repos_url":"https://api.github.com/users/mpenet/repos","events_url":"https://api.github.com/users/mpenet/events{/privacy}","received_events_url":"https://api.github.com/users/mpenet/received_events","type":"User","site_admin":false},"created_at":"2016-05-16T17:28:02Z","updated_at":"2016-05-16T17:28:02Z","body":"I think I have spotted the pb in the clients transducer use for decoding the body. I ll try to patch it as soon as I have skme free time. "}}