mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-07-05 11:36:16 +00:00
Add debugging code for ssl errors.
This commit is contained in:
parent
c9888a285e
commit
1b0eac2870
@ -25,6 +25,8 @@ Download::Download()
|
|||||||
&HashAndSaveFile::hashAndSave, Qt::QueuedConnection);
|
&HashAndSaveFile::hashAndSave, Qt::QueuedConnection);
|
||||||
connect(m_hashAndSave, &HashAndSaveFile::hashAndSaveFinished, this,
|
connect(m_hashAndSave, &HashAndSaveFile::hashAndSaveFinished, this,
|
||||||
&Download::handleHashAndSaveFinished, Qt::QueuedConnection);
|
&Download::handleHashAndSaveFinished, Qt::QueuedConnection);
|
||||||
|
connect(&m_networkManager, &QNetworkAccessManager::sslErrors, this,
|
||||||
|
&Download::handleSslErrors);
|
||||||
updateModelList();
|
updateModelList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,6 +130,13 @@ void Download::cancelDownload(const QString &modelFile)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Download::handleSslErrors(QNetworkReply *reply, const QList<QSslError> &errors)
|
||||||
|
{
|
||||||
|
QUrl url = reply->request().url();
|
||||||
|
for (auto e : errors)
|
||||||
|
qWarning() << "ERROR: Received ssl error:" << e.errorString() << "for" << url;
|
||||||
|
}
|
||||||
|
|
||||||
void Download::handleJsonDownloadFinished()
|
void Download::handleJsonDownloadFinished()
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -61,6 +61,7 @@ public:
|
|||||||
Q_INVOKABLE QString downloadLocalModelsPath() const;
|
Q_INVOKABLE QString downloadLocalModelsPath() const;
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
void handleSslErrors(QNetworkReply *reply, const QList<QSslError> &errors);
|
||||||
void handleJsonDownloadFinished();
|
void handleJsonDownloadFinished();
|
||||||
void handleDownloadProgress(qint64 bytesReceived, qint64 bytesTotal);
|
void handleDownloadProgress(qint64 bytesReceived, qint64 bytesTotal);
|
||||||
void handleModelDownloadFinished();
|
void handleModelDownloadFinished();
|
||||||
|
@ -28,6 +28,8 @@ Network::Network()
|
|||||||
settings.setValue("uniqueId", m_uniqueId);
|
settings.setValue("uniqueId", m_uniqueId);
|
||||||
settings.sync();
|
settings.sync();
|
||||||
setActive(settings.value("network/isActive", false).toBool());
|
setActive(settings.value("network/isActive", false).toBool());
|
||||||
|
connect(&m_networkManager, &QNetworkAccessManager::sslErrors, this,
|
||||||
|
&Network::handleSslErrors);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Network::setActive(bool b)
|
void Network::setActive(bool b)
|
||||||
@ -126,6 +128,13 @@ void Network::handleJsonUploadFinished()
|
|||||||
jsonReply->deleteLater();
|
jsonReply->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Network::handleSslErrors(QNetworkReply *reply, const QList<QSslError> &errors)
|
||||||
|
{
|
||||||
|
QUrl url = reply->request().url();
|
||||||
|
for (auto e : errors)
|
||||||
|
qWarning() << "ERROR: Received ssl error:" << e.errorString() << "for" << url;
|
||||||
|
}
|
||||||
|
|
||||||
bool Network::sendConversation(const QString &ingestId, const QString &conversation)
|
bool Network::sendConversation(const QString &ingestId, const QString &conversation)
|
||||||
{
|
{
|
||||||
return packageAndSendJson(ingestId, conversation);
|
return packageAndSendJson(ingestId, conversation);
|
||||||
|
@ -25,6 +25,7 @@ Q_SIGNALS:
|
|||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void handleHealthFinished();
|
void handleHealthFinished();
|
||||||
void handleJsonUploadFinished();
|
void handleJsonUploadFinished();
|
||||||
|
void handleSslErrors(QNetworkReply *reply, const QList<QSslError> &errors);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void sendHealth();
|
void sendHealth();
|
||||||
|
Loading…
Reference in New Issue
Block a user