diff --git a/src/runtime/src/comms.rs b/src/runtime/src/comms.rs index 2619d87..b3ccb3a 100644 --- a/src/runtime/src/comms.rs +++ b/src/runtime/src/comms.rs @@ -86,7 +86,6 @@ enum Reply { static CACHE_STORE: Mutex>> = Mutex::new(BTreeMap::new()); static DMA_RECORD_STORE: Mutex, i64)>> = Mutex::new(BTreeMap::new()); -static mut MGMT_STARTED: bool = false; async fn write_header(stream: &TcpStream, reply: Reply) -> Result<()> { stream.send_slice(&[0x5a, 0x5a, 0x5a, 0x5a, reply.to_u8().unwrap()]).await?; @@ -443,10 +442,7 @@ pub fn main(timer: GlobalTimer, cfg: Config) { } mgmt::start(cfg); - unsafe { - MGMT_STARTED = true; - } - + task::spawn(async move { let connection = Rc::new(Semaphore::new(1, 1)); let terminate = Rc::new(Semaphore::new(0, 1));