Skip to content

Commit

Permalink
perf(mqtt): use default (less often) keep alive interval
Browse files Browse the repository at this point in the history
  • Loading branch information
EdJoPaTo committed Jan 1, 2021
1 parent 69c02de commit 290a990
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ fn main() -> Result<(), Box<dyn Error>> {
let args = cli::get_runtime_arguments();

let client_id = format!("mqttui-{:x}", rand::random::<u32>());
let mut mqttoptions = MqttOptions::new(client_id, &args.host, args.port);
mqttoptions.set_keep_alive(5);

let mqttoptions = MqttOptions::new(client_id, &args.host, args.port);
let (mut client, connection) = Client::new(mqttoptions, 10);

if let Some(payload) = args.payload {
Expand Down

0 comments on commit 290a990

Please sign in to comment.