Skip to content

Commit aff4ff9

Browse files
committed
fix(sandbox): use SessionHandle for the sidecar supervisor session
The network-sidecar path in openshell-sandbox spawns its own supervisor session and only compiles on Linux, so the SessionHandle return type change was missed by the macOS check. Also drop a redundant path qualification flagged by the Linux build. Signed-off-by: Roland Huß <rhuss@redhat.com>
1 parent 0890eee commit aff4ff9

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎crates/openshell-sandbox/src/lib.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,9 @@ fn spawn_sidecar_entrypoint_handler(
13841384
control_publisher,
13851385
} = handler;
13861386
let mut session_started = false;
1387-
let mut session_task: Option<tokio::task::JoinHandle<()>> = None;
1387+
let mut session_task: Option<
1388+
openshell_supervisor_process::supervisor_session::SessionHandle,
1389+
> = None;
13881390
let mut trusted_supervisor_pid = None;
13891391
let terminating = Arc::new(AtomicBool::new(false));
13901392
while let Some(started) = entrypoint_rx.recv().await {

‎crates/openshell-supervisor-process/src/supervisor_session.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ async fn connect_tcp_target(
874874
netns_fd: Option<RawFd>,
875875
) -> Result<tokio::net::TcpStream, Box<dyn std::error::Error + Send + Sync>> {
876876
if let Some(fd) = netns_fd {
877-
let (tx, rx) = tokio::sync::oneshot::channel();
877+
let (tx, rx) = oneshot::channel();
878878
std::thread::spawn(move || {
879879
let result = (|| -> std::io::Result<std::net::TcpStream> {
880880
#[allow(unsafe_code)]

0 commit comments

Comments
 (0)