Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print ssl errors #4728

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/common/NetworkPrivate.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#include "common/NetworkPrivate.hpp"

#include "Application.hpp"
#include "common/NetworkManager.hpp"
#include "common/NetworkResult.hpp"
#include "common/Outcome.hpp"
#include "common/QLogging.hpp"
#include "debug/AssertInGuiThread.hpp"
#include "messages/MessageBuilder.hpp"
#include "providers/twitch/TwitchIrcServer.hpp"
#include "singletons/Paths.hpp"
#include "util/DebugCount.hpp"
#include "util/PostToThread.hpp"
Expand Down Expand Up @@ -317,6 +320,25 @@ void loadUncached(std::shared_ptr<NetworkData> &&data)
});
}
});

QObject::connect(
reply, &QNetworkReply::sslErrors, worker,
[](const auto &sslErrors) {
if (!sslErrors.isEmpty())
{
QString text;
for (const auto &error : sslErrors)
{
text.append(
QString("Error: %1 (%2)")
.arg(error.errorString(), error.error()));
}
auto msg = makeSystemMessage(text);
getApp()->twitch->forEachChannel([msg](ChannelPtr channel) {
channel->addMessage(msg);
});
}
});
};

QObject::connect(&requester, &NetworkRequester::requestUrl, worker,
Expand Down
Loading