QNonContiguousByteDeviceThreadForwardImpl: reset m_atEnd during reset()

Because otherwise the atEnd() function will return true if we finished
an upload, and then we reset due to an error and try to upload again.
In a future patch we rely on atEnd() returning true only if the data
has actually been consumed, so re-uploads will not work correctly.

Pick-to: 6.6 6.5
Change-Id: Id914648f2509dd112b6bfc71231caa59cbe8ae68
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
bb10
Mårten Nordheim 2023-10-02 12:43:38 +02:00
parent 3ea46fa978
commit 127e6cc907
1 changed files with 1 additions and 0 deletions

View File

@ -248,6 +248,7 @@ public:
if (b) {
// the reset succeeded, we're at pos 0 again
m_pos = 0;
m_atEnd = false;
// the HTTP code will anyway abort the request if !b.
}
return b;