minor fixes
This commit is contained in:
parent
ffab5ed4a5
commit
038faae0e4
@ -4,5 +4,4 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
yaml-rust = "*"
|
yaml-rust = "*"
|
||||||
linked-hash-map = "*"
|
|
@ -28,7 +28,7 @@ impl<'a> Client<'a> {
|
|||||||
println!("len_pack {}", self.hs.get_host_name());
|
println!("len_pack {}", self.hs.get_host_name());
|
||||||
}
|
}
|
||||||
|
|
||||||
fn join_conexions_mutex(mut origin: TcpStream,
|
fn join_conexions(mut origin: TcpStream,
|
||||||
mut dest: TcpStream,
|
mut dest: TcpStream,
|
||||||
run: Arc<RwLock<bool>>){
|
run: Arc<RwLock<bool>>){
|
||||||
let mut buf: [u8; 200] = [0; 200];
|
let mut buf: [u8; 200] = [0; 200];
|
||||||
@ -57,7 +57,7 @@ impl<'a> Client<'a> {
|
|||||||
let s1 = self.server.try_clone().unwrap();
|
let s1 = self.server.try_clone().unwrap();
|
||||||
let r1 = self.run.clone();
|
let r1 = self.run.clone();
|
||||||
let handler1 = thread::spawn( || {
|
let handler1 = thread::spawn( || {
|
||||||
Self::join_conexions_mutex(s1,
|
Self::join_conexions(s1,
|
||||||
c1,
|
c1,
|
||||||
r1)}
|
r1)}
|
||||||
);
|
);
|
||||||
@ -66,7 +66,7 @@ impl<'a> Client<'a> {
|
|||||||
let s2 = self.server.try_clone().unwrap();
|
let s2 = self.server.try_clone().unwrap();
|
||||||
let r2 = self.run.clone();
|
let r2 = self.run.clone();
|
||||||
let handler2 = thread::spawn( || {
|
let handler2 = thread::spawn( || {
|
||||||
Self::join_conexions_mutex(c2,
|
Self::join_conexions(c2,
|
||||||
s2,
|
s2,
|
||||||
r2)}
|
r2)}
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user