[whatwg/streams] Inconsistency between abort() then error() and error() then abort(), with ongoing close()/write() (#693)

>From https://github.com/whatwg/streams/pull/672#discussion_r105079238

`writer.abort()` fails immediately when the writable stream is in the `"errored"` state regardless of whether or not the stream has an unfinished in-flight close()/write().

OTOH, when a writable stream is errored by `controller.error()` with a pending `writer.abort()` and an in-flight close()/write() on it, `writer.abort()` gets rejected only after the stream finishes the in-flight close()/write().

I found this inconsistent and raised a discussion in the PR.

I agree with ricea that this is a trivial less-important corner case, but sometimes inconsistent behavior confuses users or is working as a hidden source of code complexity. So, I'd like to another scan after landing the PR.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/693

Received on Thursday, 9 March 2017 07:49:05 UTC