Skip to content

Commit

Permalink
localdocs: explicitly process at least one word
Browse files Browse the repository at this point in the history
Signed-off-by: Jared Van Bortel <[email protected]>
  • Loading branch information
cebtenzzre committed Oct 15, 2024
1 parent 482be4b commit 931a66e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gpt4all-chat/src/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1363,10 +1363,6 @@ ChunkStreamer::Status ChunkStreamer::step()
m_docKey.reset(); // done processing
return *error;
}
if (m_database->scanQueueInterrupted()) {
retval = Status::INTERRUPTED;
break;
}

// get a word, if needed
std::optional<QString> word = QString(); // empty string to disable EOF logic
Expand Down Expand Up @@ -1459,6 +1455,11 @@ ChunkStreamer::Status ChunkStreamer::step()
break;
}
}

if (m_database->scanQueueInterrupted()) {
retval = Status::INTERRUPTED;
break;
}
}

if (nChunks) {
Expand Down

0 comments on commit 931a66e

Please sign in to comment.