don't need that anymore
This commit is contained in:
parent
8c5dd57fac
commit
a3350792c7
1 changed files with 2 additions and 2 deletions
|
@ -35,7 +35,7 @@ impl Socket {
|
||||||
let mut streams = thread_owned_streams.lock().unwrap();
|
let mut streams = thread_owned_streams.lock().unwrap();
|
||||||
streams.push(Arc::clone(&stream));
|
streams.push(Arc::clone(&stream));
|
||||||
//pass off a clone of the thread-passable pointer
|
//pass off a clone of the thread-passable pointer
|
||||||
Socket::handle_client(stream.as_ref(), messenger_tx.clone(), thread_stop_flag.clone(), Arc::clone(&thread_owned_streams));
|
Socket::handle_client(stream.as_ref(), messenger_tx.clone(), thread_stop_flag.clone());
|
||||||
}
|
}
|
||||||
thread::sleep(Duration::from_millis(100));
|
thread::sleep(Duration::from_millis(100));
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ impl Socket {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn handle_client(mut stream: &TcpStream, update_tx: Sender<String>, program_shutdown_flag: sync_flag::SyncFlagRx, thread_owned_streams: Arc<Mutex<Vec<Arc<TcpStream>>>>) {
|
pub fn handle_client(mut stream: &TcpStream, update_tx: Sender<String>, program_shutdown_flag: sync_flag::SyncFlagRx) {
|
||||||
let mut buffer = [0; 1024];
|
let mut buffer = [0; 1024];
|
||||||
stream.set_read_timeout(Some(Duration::from_millis(100))).expect("Could not set a read timeout");
|
stream.set_read_timeout(Some(Duration::from_millis(100))).expect("Could not set a read timeout");
|
||||||
while program_shutdown_flag.get() {
|
while program_shutdown_flag.get() {
|
||||||
|
|
Loading…
Reference in a new issue