Stable releases

This commit is contained in:
asonix
2020-09-13 19:46:13 -05:00
parent 2289e6e34c
commit dd83f4a859
3 changed files with 87 additions and 133 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ impl Requests {
pub fn new(key_id: String, private_key: RSAPrivateKey, user_agent: String) -> Self {
Requests {
client: Rc::new(RefCell::new(
Client::build()
Client::builder()
.header("User-Agent", user_agent.clone())
.finish(),
)),
@@ -45,7 +45,7 @@ impl Requests {
let count = self.consecutive_errors.fetch_add(1, Ordering::Relaxed);
if count + 1 >= self.error_limit {
warn!("{} consecutive errors, rebuilding http client", count);
*self.client.borrow_mut() = Client::build()
*self.client.borrow_mut() = Client::builder()
.header("User-Agent", self.user_agent.clone())
.finish();
self.reset_err();