Skip to content

Commit

Permalink
S3 streamer discard read bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Nov 9, 2020
1 parent f088c5b commit 7102aeb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/SotoCore/HTTP/S3StreamReader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ class S3ChunkedStreamReader: StreamReader {
// if the supplied buffer still has readable bytes then store this buffer so those bytes can
// be used in the next call to `fillWorkingBuffer`.
if buffer.readableBytes > 0 {
buffer.discardReadBytes()
self.previouslyReadBuffer = buffer
}
promise.succeed(self.workingBuffer)
Expand Down

0 comments on commit 7102aeb

Please sign in to comment.