From bdb0f5d02522ac9b9c327276e1da0fc0ac9756aa Mon Sep 17 00:00:00 2001 From: Badr Date: Thu, 17 Oct 2024 14:50:57 +0200 Subject: [PATCH] fix hangin issue --- oryx-tui/src/handler.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/oryx-tui/src/handler.rs b/oryx-tui/src/handler.rs index 42d704b..8d88667 100644 --- a/oryx-tui/src/handler.rs +++ b/oryx-tui/src/handler.rs @@ -1,4 +1,7 @@ -use std::{thread, time::Duration}; +use std::{ + thread::{self, sleep}, + time::Duration, +}; use crate::{ app::{ActivePopup, App, AppResult}, @@ -26,6 +29,8 @@ pub fn handle_key_events( .start(event_sender.clone(), app.data_channel_sender.clone())?; app.start_sniffing = true; + // Fix start hanging + sleep(Duration::from_millis(150)); } }