diff --git a/Cargo.lock b/Cargo.lock index 9d1772a..c5461d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -99,7 +99,7 @@ dependencies = [ [[package]] name = "rtracy" -version = "0.1.0" +version = "0.1.1" dependencies = [ "bincode", "lz4", diff --git a/Cargo.toml b/Cargo.toml index b688661..4527250 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rtracy" -version = "0.1.0" +version = "0.1.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/server.rs b/src/server.rs index 248d312..9e3162c 100644 --- a/src/server.rs +++ b/src/server.rs @@ -33,7 +33,7 @@ impl ServerContext<'_> { loop { let e1: Result = bincode::decode_from_reader(&mut self.events_data, BINCODE_CONFIG); if e1.is_err() { - println!("Read done"); + println!("Reached end of file"); break; } let event = e1.unwrap(); @@ -94,7 +94,11 @@ impl ServerContext<'_> { } } self.flush_buffer()?; - while self.process_query()? { + println!("Sending done, wait 20 seconds to handle queries"); + for _i in 0..2 { + if !self.process_query()? { + return Ok(()); + } sleep(Duration::from_millis(10)); }