mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-02-09 01:59:16 +08:00
server must join
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
|
||||
name = "shadowsocks-rust"
|
||||
version = "0.9.12"
|
||||
version = "0.9.13"
|
||||
authors = ["Y. T. CHUNG <zonyitoo@gmail.com>"]
|
||||
|
||||
[lib]
|
||||
|
||||
@@ -262,11 +262,18 @@ impl TcpRelayServer {
|
||||
|
||||
impl TcpRelayServer {
|
||||
pub fn run(&self) {
|
||||
let mut futs = Vec::with_capacity(self.config.server.len());
|
||||
|
||||
for s in self.config.server.iter() {
|
||||
let s = s.clone();
|
||||
Builder::new().stack_size(COROUTINE_STACK_SIZE).spawn(move || {
|
||||
let fut = Builder::new().stack_size(COROUTINE_STACK_SIZE).spawn(move || {
|
||||
TcpRelayServer::accept_loop(s);
|
||||
});
|
||||
futs.push(fut);
|
||||
}
|
||||
|
||||
for fut in futs {
|
||||
fut.join().unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user