Lubaoshuai commented on issue #16458: URL: https://github.com/apache/dubbo/issues/16458#issuecomment-5654514626
Hi, is anyone already working on this? Looking at CompositeInputStream, totalAvailable/readIndex are plain ints and the read loop releases the head stream once available() == 0, so a close() racing an in-flight read can observe torn state. I'd like to attempt a fix — my inclination is to make close() idempotent and synchronize the stream swap in the read loop, then define read-after-close as EOF. One question before I start: when close() lands mid-read, should a read() that already copied some bytes return the partial count, or is throwing preferred? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
