fix search command

This commit is contained in:
poslop
2023-01-13 16:09:09 -06:00
parent dbc72c0fd4
commit 6fa6c31581
2 changed files with 3 additions and 2 deletions

View File

@@ -23,6 +23,7 @@ pub fn cons_rw(sock: &TcpSock, input: &str) -> String {
Err(_) => break(),
};
}
output.clear();
writer.write((input.to_owned() + "\n").as_bytes()).unwrap();

View File

@@ -10,7 +10,7 @@ pub struct TcpSock {
impl TcpSock {
pub fn new(ip: String, port: String) -> std::io::Result<Self> {
let stream = TcpStream::connect(format!("{}:{}", ip, port)).expect("Tcp connection fail");
stream.set_read_timeout(Some(Duration::from_millis(25)))?;
stream.set_read_timeout(Some(Duration::from_millis(100)))?;
println!("Socket Connected!!");
Ok(TcpSock { stream })
}
@@ -50,4 +50,4 @@ pub struct AdminConsole {
impl TypeMapKey for Config {
type Value = Config;
}
}