Re: [whatwg/streams] pipeTo() text appears to say all queued writable chunks must be written on readable error (#738)

I can see two opposing viewpoints here:
1. The source is broken, we have failed, we should stop as soon as it is safe to do so.
2. The source is broken, we should save as much data as we can.

I can only think of one precedent for this at the moment. In Windows socket code, if the connection is reset, any data that has not yet been read by the application is discarded. On Unix, the application can still read all remaining data. The Unix behaviour is generally considered more useful among people who write cross-platform socket code.

However there is a difference in that even on Unix the application can choose to discard that data. With pipeTo applications are stuck with whichever behaviour we choose.

I am leaning towards 2. as it minimises the risk of data loss.

-- 
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/738#issuecomment-296500117

Received on Monday, 24 April 2017 00:28:32 UTC