remove unnecessary MGMT_STARTED

This commit is contained in:
mwojcik 2022-10-05 17:26:58 +08:00
parent 052cae9df7
commit f94c291c68

View File

@ -86,7 +86,6 @@ enum Reply {
static CACHE_STORE: Mutex<BTreeMap<String, Vec<i32>>> = Mutex::new(BTreeMap::new());
static DMA_RECORD_STORE: Mutex<BTreeMap<String, (Vec<u8>, 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));