ChanViewer: If catalog download fails, don't try to parse response JSON

This commit is contained in:
Andreas Kling 2019-08-04 22:11:50 +02:00
parent 54ed6a888d
commit 103c2749ce

View file

@ -26,8 +26,12 @@ void ThreadCatalogModel::update()
job->on_finish = [job, this](bool success) {
auto* response = job->response();
dbg() << "job finished! success=" << success << ", response=" << response;
dbg() << "payload size: " << response->payload().size();
dbg() << "Catalog download finished, success=" << success << ", response=" << response;
if (!success)
return;
dbg() << "Catalog payload size: " << response->payload().size();
auto json = JsonValue::from_string(response->payload());