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
As previously discussed, the spec doesn't have anything for waitForReadable promises being rejected when a FIN bit is received for the QUIC stream. At this point we know there will be no more incoming data and know if the Promise can't be fulfilled.
Changes I'll make in a PR:
remove "Promises won't be rejected" from waitForReadable & waitForWritable
Update waitForReadable & waitForWritable to mention that promises will be rejected if [[Readable/Writable]] transitions from true to false
Add to waitForReadable - on receiving/reading a FIN bit, any unsettled promises will be rejected if they can't be fulfilled with the amount of data buffered in the QUIC stream
One question is whether to resolve or reject the Promise when receiving the FIN bit. Here's the problems I see doing it either way:
Resolving the promise
It isn't really being resolved because the amount available to be read is smaller than asked with waitForReadable. A solution to this could be resolving the promise with the amount available as opposed to undefined in other cases.
Rejecting the promise:
When the promise gets rejected [[Readable]] can be either true or false. In some cases you want to read the remaining data even though the promise is getting rejected.
The text was updated successfully, but these errors were encountered:
shampson
pushed a commit
to shampson/webrtc-quic
that referenced
this issue
Jun 4, 2018
As previously discussed, the spec doesn't have anything for waitForReadable promises being rejected when a FIN bit is received for the QUIC stream. At this point we know there will be no more incoming data and know if the Promise can't be fulfilled.
Changes I'll make in a PR:
One question is whether to resolve or reject the Promise when receiving the FIN bit. Here's the problems I see doing it either way:
The text was updated successfully, but these errors were encountered: