mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-06-05 05:32:54 +00:00
fix json EOF handling
This commit is contained in:
parent
9f130b07ed
commit
ea2ced8c8b
@ -19,7 +19,7 @@ JsonStreamDevice::JsonStreamDevice(const json::value *jv, QObject *parent)
|
||||
|
||||
qint64 JsonStreamDevice::readData(char *data, qint64 maxSize)
|
||||
{
|
||||
if (m_sr.done()) return 0;
|
||||
if (m_sr.done()) return -1; // EOF
|
||||
auto chunk = m_sr.read(data, size_t(maxSize));
|
||||
return qint64(chunk.size());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user