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
Currently, the implementation of BufferedInputStreamWrapper::tryRead will throw on premature EOF due to forwarding to InputStream::read if the buffer is insufficient to fill the request:
Looks like this bug was introduced in 227a491 when tryRead() was introduced and this implementation of read() was renamed to tryRead() without looking carefully enough at the details.
And that was 11 years ago, and no one ever noticed, I guess...
Currently, the implementation of
BufferedInputStreamWrapper::tryRead
will throw on premature EOF due to forwarding toInputStream::read
if the buffer is insufficient to fill the request:capnproto/c++/src/kj/io.c++
Line 156 in 737dba8
capnproto/c++/src/kj/io.c++
Line 164 in 737dba8
Wouldn't it make more sense to forward the read requests to
InputStream::tryRead
instead?The text was updated successfully, but these errors were encountered: