diff --git a/src/cli_helpers.rs b/src/cli_helpers.rs index bb4732a..5f8e005 100644 --- a/src/cli_helpers.rs +++ b/src/cli_helpers.rs @@ -84,7 +84,7 @@ pub struct Opt { #[structopt(short, long)] pub verbose: bool, - /// Exits of no messages received after seconds. + /// Exits if no messages received after seconds. #[structopt(long)] pub timeout: Option, } diff --git a/src/kinesis/ticker.rs b/src/kinesis/ticker.rs index 8302aa7..bd420b8 100644 --- a/src/kinesis/ticker.rs +++ b/src/kinesis/ticker.rs @@ -92,7 +92,10 @@ impl Ticker { let duration = Utc::now() - last_ts; if duration.num_milliseconds() > (timeout * 1000) as i64 { - tx_records.send(Err(Timeout(duration))).await.unwrap(); + tx_records + .send(Err(Timeout(duration))) + .await + .expect("Could not sent Timeout to tx_records"); } sleep(delay).await