mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-23 12:31:22 +00:00
fix json EOF handling
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user