kernel: fix warning in hosted mode

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2022-05-31 11:18:43 +08:00
parent 7e07c69b71
commit 8edf03a243

View file

@ -192,7 +192,7 @@ fn handle_connection(
std::thread::Builder::new()
.name(format!("PID {}: client should_exit thread", pid))
.spawn(move || loop {
if should_exit.load(core::sync::atomic::Ordering::Relaxed) {
if should_exit.load(Ordering::Relaxed) {
eprintln!("KERNEL: should_exit == 1");
// sender.send(ServerMessage::Exit).ok();
// WARNING: This functionality is unimplemented right now
@ -385,7 +385,7 @@ fn listen_thread(
should_exit: std::sync::Arc<core::sync::atomic::AtomicBool>,
clients: Vec<(std::thread::JoinHandle<()>, TcpStream)>,
) {
should_exit.store(true, core::sync::atomic::Ordering::Relaxed);
should_exit.store(true, Ordering::Relaxed);
for (jh, conn) in clients {
use std::net::Shutdown;
conn.shutdown(Shutdown::Both).ok();