Re: [whatwg/streams] Editorial: fix byte stream examples to respond(0) after close() (#1173)

@ricea approved this pull request.

lgtm

I will merge once the build appears to be working again.

> @@ -7234,15 +7234,21 @@ function makeUDPSocketStream(host, port) {
           if (controller.byobRequest) {
             const v = controller.byobRequest.view;
             bytesRead = socket.readInto(v.buffer, v.byteOffset, v.byteLength);
+            if (bytesRead === 0) {
+              controller.close();

Nice catch.

-- 
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/pull/1173#pullrequestreview-776155288

Received on Monday, 11 October 2021 12:11:16 UTC