From 4a2218641f46185adce38ea7cb4759c5c37bb50e Mon Sep 17 00:00:00 2001 From: spaqin Date: Wed, 2 Mar 2022 15:45:17 +0800 Subject: [PATCH] fix BorrowMutError in moninj --- src/runtime/src/moninj.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runtime/src/moninj.rs b/src/runtime/src/moninj.rs index 77b79420..b9c66c48 100644 --- a/src/runtime/src/moninj.rs +++ b/src/runtime/src/moninj.rs @@ -137,8 +137,7 @@ macro_rules! dispatch { ($timer:ident, $aux_mutex:ident, $routing_table:ident, $channel:expr, $func:ident $(, $param:expr)*) => {{ let destination = ($channel >> 16) as u8; let channel = $channel; - let routing_table = $routing_table.borrow_mut(); - let hop = routing_table.0[destination as usize][0]; + let hop = $routing_table.0[destination as usize][0]; if hop == 0 { local_moninj::$func(channel.into(), $($param, )*) } else { @@ -157,7 +156,7 @@ macro_rules! dispatch { } async fn handle_connection(stream: &TcpStream, timer: GlobalTimer, - _aux_mutex: &Rc>, _routing_table: &Rc>) -> Result<()> { + _aux_mutex: &Rc>, _routing_table: &drtio_routing::RoutingTable) -> Result<()> { if !expect(&stream, b"ARTIQ moninj\n").await? { return Err(Error::UnexpectedPattern); } @@ -262,6 +261,7 @@ pub fn start(timer: GlobalTimer, aux_mutex: Rc>, routing_table: Rc info!("peer closed connection"),