On Tue, 27 Sep 2022 13:55:14 GMT, Roger Riggs <rri...@openjdk.org> wrote:
>> test/jdk/java/net/vthread/BlockingSocketOps.java line 714: >> >>> 712: } >>> 713: >>> 714: static void readToEOF(InputStream in) throws IOException { >> >> just curious: isn't that just `in.readAllBytes()`? >> Oh - I see. You don't want to accumulate all the bytes. >> An alternative would be `in.transferTo(OutputStream.nullOutputStream())` > > Or perhaps `InputStream.skip(MAX_INT)`. Yes, this would work too. We just need something to read the input stream to EOF so that the connection peer reads -1/EOF. ------------- PR: https://git.openjdk.org/jdk/pull/10427