http: Always use/require progress in requests.

This fixes several cases where we weren't passing cancel flags
consistently.
This commit is contained in:
Unknown W. Brackets committed 2021-05-01 11:20:05 -07:00
1 parent f762fbc53d
commit 3379f33882
9 files changed
+69 -59

No files matched your search

+4 -2
View File
@@ -136,7 +136,8 @@ bool RemoteISOConnectScreen::FindServer(std::string &resultHost, int &resultPort
}
SetStatus("Loading game list from [URL]...", host, port);
code = http.GET(subdir.c_str(), &result);
http::RequestProgress progress(&scanCancelled);
code = http.GET(subdir.c_str(), &result, &progress);
http.Disconnect();
if (code != 200) {
@@ -189,7 +190,8 @@ bool RemoteISOConnectScreen::FindServer(std::string &resultHost, int &resultPort
SetStatus("Looking for peers...", "", 0);
if (http.Resolve(REPORT_HOSTNAME, REPORT_PORT)) {
if (http.Connect(2, 20.0, &scanCancelled)) {
code = http.GET("/match/list", &result);
http::RequestProgress progress(&scanCancelled);
code = http.GET("/match/list", &result, &progress);
http.Disconnect();
}
}