Skip to content

Commit

Permalink
remove second timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
bold committed May 8, 2019
1 parent b903ae1 commit c015ace
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 0 additions & 2 deletions src/miner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,6 @@ impl Miner {
cfg.url,
cfg.account_id_to_secret_phrase,
cfg.timeout,
// ensure timeout < polling intervall
min(cfg.timeout, max(1000, cfg.get_mining_info_interval) - 200),
(total_size * 4 / 1024 / 1024) as usize,
cfg.send_proxy_details,
cfg.additional_headers,
Expand Down
5 changes: 1 addition & 4 deletions src/requests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pub struct RequestHandler {
account_id_to_secret_phrase: HashMap<u64, String>,
base_uri: Url,
timeout: Duration,
timeout2: Duration,
total_size_gb: usize,
send_proxy_details: bool,
headers: reqwest::header::HeaderMap,
Expand Down Expand Up @@ -114,7 +113,6 @@ impl RequestHandler {
base_uri: Url,
mut secret_phrases: HashMap<u64, String>,
timeout: u64,
timeout2: u64,
total_size_gb: usize,
send_proxy_details: bool,
additional_headers: HashMap<String, String>,
Expand Down Expand Up @@ -155,7 +153,6 @@ impl RequestHandler {
account_id_to_secret_phrase: secret_phrases,
base_uri,
timeout: Duration::from_millis(timeout),
timeout2: Duration::from_millis(timeout2),
total_size_gb,
send_proxy_details,
headers,
Expand All @@ -178,7 +175,7 @@ impl RequestHandler {
self.uri_for("burst", "requestType=getMiningInfo"),
reqwest::Method::GET,
self.headers.clone(),
self.timeout2,
self.timeout,
)
}

Expand Down

0 comments on commit c015ace

Please sign in to comment.