Closed domenic closed 9 years ago
Ok, thanks for spotting this Domenic. I'll replace .wait()
with .ready
in the examples and comments. Furthermore I see in https://github.com/whatwg/streams/issues/245 that .ready
is fulfill-only. So in the examples in the TCP and UDP Socket API specification errors must be handled in another way than with a promise reject function for .ready
. I guess that I just can remove the promise reject handling and rely on mySocket.closed...
handling to detect for example situations like loss of network contact.
Oh yeah, sorry for not noticing that too.
I guess that I just can remove the promise reject handling and rely on mySocket.closed... handling to detect for example situations like loss of network contact.
That was exactly the reasoning :)
I fill that and make a PR.
I did a scan and .wait() is only used in notes and in examples so this is pretty minor. But in https://github.com/whatwg/streams/issues/243 we changed from a side-effecting
.wait()
to a passive.ready
in the public API.