mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 00:02:25 +00:00
Make S3 downloads slightly more interruptable
(cherry picked from commit d38f62f64d
)
This commit is contained in:
parent
4912a9e7fd
commit
339236d32e
@ -9,6 +9,7 @@
|
||||
#include "globals.hh"
|
||||
#include "compression.hh"
|
||||
#include "filetransfer.hh"
|
||||
#include "signals.hh"
|
||||
|
||||
#include <aws/core/Aws.h>
|
||||
#include <aws/core/VersionConfig.h>
|
||||
@ -117,6 +118,7 @@ class RetryStrategy : public Aws::Client::DefaultRetryStrategy
|
||||
{
|
||||
bool ShouldRetry(const Aws::Client::AWSError<Aws::Client::CoreErrors>& error, long attemptedRetries) const override
|
||||
{
|
||||
checkInterrupt();
|
||||
auto retry = Aws::Client::DefaultRetryStrategy::ShouldRetry(error, attemptedRetries);
|
||||
if (retry)
|
||||
printError("AWS error '%s' (%s), will retry in %d ms",
|
||||
|
Loading…
Reference in New Issue
Block a user