Sets the transfer stall timeout.
If a transfer (upload, download, or request) stalls, i.e., no bytes are sent or received for a significant period, it may be better to restart the transfer as this may indicate a network glitch. For downloads the google::cloud::storage::DownloadStallTimeoutOption takes precedence.
For large requests (e.g. downloads in the GiB to TiB range) this is a better configuration parameter than a simple timeout, as the transfers will take minutes or hours to complete. Relying on a timeout value for them would not work, as the timeout would be too large to be useful. For small requests, this is as effective as a timeout parameter, but maybe unfamiliar and thus harder to reason about.
For gRPC unary RPCs, where no incremental progress can be observed, this option is applied as a per-attempt deadline instead. It is enabled by default (120 seconds); setting it to std::chrono::seconds(0) (or a negative value) disables the deadline for these RPCs.
Type Aliases
Type
std::chrono::seconds