summaryrefslogtreecommitdiff
path: root/src/client/connector/httpconnector.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/connector/httpconnector.rs')
-rw-r--r--src/client/connector/httpconnector.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/connector/httpconnector.rs b/src/client/connector/httpconnector.rs
index 985d9c0..b8369fe 100644
--- a/src/client/connector/httpconnector.rs
+++ b/src/client/connector/httpconnector.rs
@@ -36,15 +36,16 @@ impl HTTPConnector {
})
}
+ #[allow(clippy::only_used_in_recursion)]
fn handle_response<F: Fn() -> RequestBuilder>(
&self,
- resp: F,
+ req: F,
) -> Result<<HTTPConnector as Connection>::Ok, <HTTPConnector as Connection>::Err> {
- match resp().send() {
+ match req().send() {
Ok(resp) => match resp.status() {
StatusCode::TOO_MANY_REQUESTS => {
sleep(Duration::from_secs(5));
- self.update()
+ self.handle_response(req)
}
status => {
if !status.is_success() {