You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling cancel(reason) on a locked readable stream should not cause invalid state error. I cannot see anything that would say so in the spec and doing so causes incompatibility with the fetch spec.
Exactly what @Svanazar said. Throwing is the correct behavior. The rationale is that when a stream is locked, the reader takes over ownership of its lifecycle. The reader to which the stream is locked can cancel it but the stream itself cannot be directly canceled while locked.
Calling
cancel(reason)
on a locked readable stream should not cause invalid state error. I cannot see anything that would say so in the spec and doing so causes incompatibility with the fetch spec.Refs: nodejs/undici#1138 (comment)
Refs: https://streams.spec.whatwg.org/#readable-stream-cancel
The text was updated successfully, but these errors were encountered: