{"action":"created","issue":{"url":"https://api.github.com/repos/whatwg/streams/issues/347","labels_url":"https://api.github.com/repos/whatwg/streams/issues/347/labels{/name}","comments_url":"https://api.github.com/repos/whatwg/streams/issues/347/comments","events_url":"https://api.github.com/repos/whatwg/streams/issues/347/events","html_url":"https://github.com/whatwg/streams/issues/347","id":70812190,"number":347,"title":"Canceling tee'ed streams does not cancel original stream","user":{"login":"edhager","id":4441986,"avatar_url":"https://avatars.githubusercontent.com/u/4441986?v=3","gravatar_id":"","url":"https://api.github.com/users/edhager","html_url":"https://github.com/edhager","followers_url":"https://api.github.com/users/edhager/followers","following_url":"https://api.github.com/users/edhager/following{/other_user}","gists_url":"https://api.github.com/users/edhager/gists{/gist_id}","starred_url":"https://api.github.com/users/edhager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edhager/subscriptions","organizations_url":"https://api.github.com/users/edhager/orgs","repos_url":"https://api.github.com/users/edhager/repos","events_url":"https://api.github.com/users/edhager/events{/privacy}","received_events_url":"https://api.github.com/users/edhager/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-24T22:39:42Z","updated_at":"2015-04-24T22:47:53Z","closed_at":null,"body":"The reader that is acquired from the original stream in the tee() method is never released:  https://streams.spec.whatwg.org/#tee-readable-stream, step 3.\r\n\r\nI don't think this code is running in your tests: https://github.com/whatwg/streams/blob/master/reference-implementation/test/readable-stream-tee.js#L147-L148.  I think the promise returned from canceling your tee'ed steams is being rejected because the call to cancel() on the original steam is rejecting due to the fact that the stream is still locked.\r\n\r\nIn the reference implementation, I think the code here https://github.com/whatwg/streams/blob/master/reference-implementation/lib/readable-stream.js#L693-L695 and here https://github.com/whatwg/streams/blob/master/reference-implementation/lib/readable-stream.js#L709-L711 needs to release the reader before calling CancelReadableStream.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/whatwg/streams/issues/comments/96088437","html_url":"https://github.com/whatwg/streams/issues/347#issuecomment-96088437","issue_url":"https://api.github.com/repos/whatwg/streams/issues/347","id":96088437,"user":{"login":"edhager","id":4441986,"avatar_url":"https://avatars.githubusercontent.com/u/4441986?v=3","gravatar_id":"","url":"https://api.github.com/users/edhager","html_url":"https://github.com/edhager","followers_url":"https://api.github.com/users/edhager/followers","following_url":"https://api.github.com/users/edhager/following{/other_user}","gists_url":"https://api.github.com/users/edhager/gists{/gist_id}","starred_url":"https://api.github.com/users/edhager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edhager/subscriptions","organizations_url":"https://api.github.com/users/edhager/orgs","repos_url":"https://api.github.com/users/edhager/repos","events_url":"https://api.github.com/users/edhager/events{/privacy}","received_events_url":"https://api.github.com/users/edhager/received_events","type":"User","site_admin":false},"created_at":"2015-04-24T22:47:52Z","updated_at":"2015-04-24T22:47:52Z","body":"Ah yes.  I was equating cancel() with CancelReadableStream.  \r\n"}}