Skip to content

Commit 3020c59

Browse files
authored
Set Storage Desktop REST requests to have no timeout. (#1561)
* Set Storage Desktop REST requests to have no timeout. * Add readme.
1 parent d05287e commit 3020c59

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

app/rest/request_options.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ struct RequestOptions {
4545
bool stream_post_fields;
4646
// Stores key-value pairs in header.
4747
std::map<std::string, std::string> header;
48-
// The maximum time in milliseconds to allow the request and response.
48+
// The maximum time in milliseconds to allow the request and response
49+
// (or 0 for no timeout).
4950
int64_t timeout_ms;
5051

5152
// Set true to make the library display more verbose info to help debug. Does

release_build_files/readme.md

+1
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,7 @@ code.
639639
GoogleUserMessagingPlatform version 2.3.0.
640640
- GMA (Android): Updated dependency to play-services-ads version 23.0.0 and
641641
user-messaging-platform version 2.2.0.
642+
- Storage (Desktop): Removed 5-minute timeout for uploads and downloads.
642643

643644
### 11.9.0
644645
- Changes

storage/src/desktop/storage_reference_desktop.cc

+3
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,9 @@ void StorageReferenceInternal::PrepareRequestBlocking(
238238
request->set_url(url);
239239
request->set_method(method);
240240

241+
// Set this request to have no timeout.
242+
request->options().timeout_ms = 0;
243+
241244
// Fetch auth token and apply it, if there is one:
242245
std::string token = storage_->GetAuthToken();
243246
if (token.length() > 0) {

0 commit comments

Comments
 (0)