diff --git a/emgauwa-core/src/app_state.rs b/emgauwa-core/src/app_state.rs index 4fd2765..2441c01 100644 --- a/emgauwa-core/src/app_state.rs +++ b/emgauwa-core/src/app_state.rs @@ -60,7 +60,9 @@ impl Handler for AppState { err ); } - block_on(address.send(ControllerWsAction::Disconnect))??; + // TODO: why does the block_on(send()) version not return? The AppState will be stuck. + //block_on(address.send(ControllerWsAction::Disconnect))??; + address.do_send(ControllerWsAction::Disconnect); } Ok(()) } @@ -84,7 +86,10 @@ impl Handler for AppState { fn handle(&mut self, msg: Action, _ctx: &mut Self::Context) -> Self::Result { log::debug!("Forwarding action: {:?}", msg.action); if let Some((_, address)) = self.connected_controllers.get(&msg.controller_uid) { - block_on(address.send(msg.action))? + // TODO: why does the block_on(send()) version not return? The AppState will be stuck. + //block_on(address.send(msg.action))? + address.do_send(msg.action); + Ok(()) } else { Err(EmgauwaError::Connection(msg.controller_uid)) }