fix some things
This commit is contained in:
@ -7,7 +7,7 @@ use tokio::sync::oneshot;
|
||||
use tauri::{AppHandle, Manager};
|
||||
|
||||
use crate::errors::RequestError;
|
||||
use crate::ipc::Approval;
|
||||
use crate::ipc::{Request, Approval};
|
||||
|
||||
|
||||
pub async fn serve(addr: SocketAddrV4, app_handle: AppHandle) -> io::Result<()> {
|
||||
@ -45,6 +45,8 @@ async fn handle(mut stream: TcpStream, app_handle: AppHandle) -> Result<(), Requ
|
||||
let (chan_send, chan_recv) = oneshot::channel();
|
||||
let app_state = app_handle.state::<crate::state::AppState>();
|
||||
let request_id = app_state.register_request(chan_send);
|
||||
// Do we want to panic if this fails? Does that mean the frontend is dead?
|
||||
app_handle.emit_all("credentials-request", Request {id: request_id}).unwrap();
|
||||
|
||||
let mut buf = [0; 8192]; // it's what tokio's BufReader uses
|
||||
let mut n = 0;
|
||||
|
Reference in New Issue
Block a user