mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
kernel: hosted: ignore errors from shutting down network socket
When running on Linux, attempting to shut down a network socket that has already been closed results in an error. That is, if the client disconnects, then the server will throw an error when it also attempts to disconnect. Ignore errors to `.shutdown()` to fix `cargo test` on Linux. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
019d520b26
commit
77426aaf56
1 changed files with 1 additions and 2 deletions
|
|
@ -293,8 +293,7 @@ fn listen_thread(
|
|||
should_exit.store(true, core::sync::atomic::Ordering::Relaxed);
|
||||
for (jh, conn) in clients {
|
||||
use std::net::Shutdown;
|
||||
conn.shutdown(Shutdown::Both)
|
||||
.expect("couldn't shutdown client");
|
||||
conn.shutdown(Shutdown::Both).ok();
|
||||
jh.join().expect("couldn't join client thread");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue