Skip to content

Commit

Permalink
Fix connect in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
sorz committed Dec 15, 2017
1 parent f827c49 commit 8563770
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ pub fn try_connect_all(dest: Destination, servers: Vec<Rc<ProxyServer>>,
parallel_n: usize, wait_response: bool,
pending_data: Option<RcBox<[u8]>>, handle: Handle)
-> TryConnectAll {
let parallel_n = cmp::min(1, parallel_n);
let parallel_n = cmp::max(1, parallel_n);
let servers = VecDeque::from_iter(servers.into_iter());
TryConnectAll {
dest, parallel_n, pending_data, wait_response, handle,
Expand Down

0 comments on commit 8563770

Please sign in to comment.