mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-18 03:25:46 +00:00
When we explicitly cancel an operation we shouldn't throw an error.
This commit is contained in:
parent
13b2d47be5
commit
0d726b22b8
@ -244,7 +244,7 @@ void ChatGPTWorker::handleReadyRead()
|
|||||||
void ChatGPTWorker::handleErrorOccurred(QNetworkReply::NetworkError code)
|
void ChatGPTWorker::handleErrorOccurred(QNetworkReply::NetworkError code)
|
||||||
{
|
{
|
||||||
QNetworkReply *reply = qobject_cast<QNetworkReply *>(sender());
|
QNetworkReply *reply = qobject_cast<QNetworkReply *>(sender());
|
||||||
if (!reply) {
|
if (!reply || reply->error() == QNetworkReply::OperationCanceledError /*when we call abort on purpose*/) {
|
||||||
emit finished();
|
emit finished();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user