diff --git a/src/p2pool/P2PoolManager.cpp b/src/p2pool/P2PoolManager.cpp index 0119aa98..74391528 100644 --- a/src/p2pool/P2PoolManager.cpp +++ b/src/p2pool/P2PoolManager.cpp @@ -68,10 +68,10 @@ void P2PoolManager::download() { std::chrono::milliseconds timeout = std::chrono::seconds(10); http_client.set_server(url.host().toStdString(), "443", {}); bool success = http_client.invoke_get(url.path().toStdString(), timeout, {}, std::addressof(response), {{"User-Agent", userAgent}}); - if (response->m_response_code == 404) { + if (success && response->m_response_code == 404) { emit p2poolDownloadFailure(BinaryNotAvailable); return; - } else if (response->m_response_code == 302) { + } else if (success && response->m_response_code == 302) { epee::net_utils::http::fields_list fields = response->m_header_info.m_etc_fields; for (std::pair i : fields) { if (i.first == "Location") {