diff --git a/artiq/firmware/runtime/session.rs b/artiq/firmware/runtime/session.rs index 197ac00fc..5a3e30020 100644 --- a/artiq/firmware/runtime/session.rs +++ b/artiq/firmware/runtime/session.rs @@ -519,16 +519,16 @@ fn host_kernel_worker(io: &Io, let mut session = Session::new(congress); loop { - while !rpc_queue::empty() { - process_kern_queued_rpc(stream, &mut session)? - } - if stream.can_recv() { process_host_message(io, stream, &mut session)? } else if !stream.may_recv() { return Ok(()) } + while !rpc_queue::empty() { + process_kern_queued_rpc(stream, &mut session)? + } + if mailbox::receive() != 0 { process_kern_message(io, Some(stream), &mut session)?; }