mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
Motivation: When the `BufferedReader` reads short when filling its buffer during a request for some bytes, it may avoid giving the caller all bytes available. The bytes remain in the buffer and are available on the next call but this appears to the caller as if the file has been read completely as the returned bytes are less than those requested. Modifications: - Read the expected bytes or whatever is left in the buffer - Add a test Result: Less unexpected behaviour