From 0d726b22b8e2783ae712b83f25ed76d51daf4220 Mon Sep 17 00:00:00 2001 From: Adam Treat Date: Wed, 12 Jul 2023 10:34:10 -0400 Subject: [PATCH] When we explicitly cancel an operation we shouldn't throw an error. --- gpt4all-chat/chatgpt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpt4all-chat/chatgpt.cpp b/gpt4all-chat/chatgpt.cpp index 13e9cd5d..c68da5df 100644 --- a/gpt4all-chat/chatgpt.cpp +++ b/gpt4all-chat/chatgpt.cpp @@ -244,7 +244,7 @@ void ChatGPTWorker::handleReadyRead() void ChatGPTWorker::handleErrorOccurred(QNetworkReply::NetworkError code) { QNetworkReply *reply = qobject_cast(sender()); - if (!reply) { + if (!reply || reply->error() == QNetworkReply::OperationCanceledError /*when we call abort on purpose*/) { emit finished(); return; }