Commit
+10 -26 +/-3 browse
1 | diff --git a/Cargo.lock b/Cargo.lock |
2 | index a93ab89..f7c495d 100644 |
3 | --- a/Cargo.lock |
4 | +++ b/Cargo.lock |
5 | @@ -139,14 +139,14 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" |
6 | |
7 | [[package]] |
8 | name = "backoff" |
9 | - version = "0.3.0" |
10 | + version = "0.4.0" |
11 | source = "registry+https://github.com/rust-lang/crates.io-index" |
12 | - checksum = "9fe17f59a06fe8b87a6fc8bf53bb70b3aba76d7685f432487a68cd5552853625" |
13 | + checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" |
14 | dependencies = [ |
15 | "futures-core", |
16 | "getrandom", |
17 | "instant", |
18 | - "pin-project", |
19 | + "pin-project-lite", |
20 | "rand", |
21 | "tokio", |
22 | ] |
23 | @@ -948,26 +948,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" |
24 | checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" |
25 | |
26 | [[package]] |
27 | - name = "pin-project" |
28 | - version = "1.0.12" |
29 | - source = "registry+https://github.com/rust-lang/crates.io-index" |
30 | - checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" |
31 | - dependencies = [ |
32 | - "pin-project-internal", |
33 | - ] |
34 | - |
35 | - [[package]] |
36 | - name = "pin-project-internal" |
37 | - version = "1.0.12" |
38 | - source = "registry+https://github.com/rust-lang/crates.io-index" |
39 | - checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" |
40 | - dependencies = [ |
41 | - "proc-macro2", |
42 | - "quote", |
43 | - "syn", |
44 | - ] |
45 | - |
46 | - [[package]] |
47 | name = "pin-project-lite" |
48 | version = "0.2.9" |
49 | source = "registry+https://github.com/rust-lang/crates.io-index" |
50 | diff --git a/Cargo.toml b/Cargo.toml |
51 | index 0f4a2dc..37577a4 100644 |
52 | --- a/Cargo.toml |
53 | +++ b/Cargo.toml |
54 | @@ -18,7 +18,7 @@ license = "MIT" |
55 | askama = "0.11" |
56 | async-stream = "0.3" |
57 | async-trait = "0.1" |
58 | - backoff = { version = "0.3", features = ["tokio"] } |
59 | + backoff = { version = "0.4", features = ["tokio"] } |
60 | bytes = "1" |
61 | chacha = "0.3" |
62 | derive_more = "0.99" |
63 | diff --git a/src/storage/s3.rs b/src/storage/s3.rs |
64 | index fb4d85c..2e6fbc7 100644 |
65 | --- a/src/storage/s3.rs |
66 | +++ b/src/storage/s3.rs |
67 | @@ -84,7 +84,7 @@ pub enum InitError { |
68 | } |
69 | |
70 | impl InitError { |
71 | - /// Converts the initialization error into an backoff error. Useful for not |
72 | + /// Converts the initialization error into a backoff error. Useful for not |
73 | /// retrying certain errors. |
74 | pub fn into_backoff(self) -> backoff::Error<InitError> { |
75 | // Certain types of errors should never be retried. |
76 | @@ -92,7 +92,11 @@ impl InitError { |
77 | InitError::Bucket | InitError::Credentials => { |
78 | backoff::Error::Permanent(self) |
79 | } |
80 | - _ => backoff::Error::Transient(self), |
81 | + _ => backoff::Error::Transient { |
82 | + err: self, |
83 | + retry_after: None, /* NOTE: None causes us to follow retry |
84 | + * policy here */ |
85 | + }, |
86 | } |
87 | } |
88 | } |