diff options
author | Tomasz Kramkowski <tomasz@kramkow.ski> | 2025-07-10 13:00:08 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tomasz@kramkow.ski> | 2025-07-10 13:04:55 +0100 |
commit | 0cabcd50d5714b09bae02de6fc13012e8abeb483 (patch) | |
tree | 84eaf2fe904115c3265f6d9ac8cfcf39337ddefd /src/config.rs | |
parent | 513bd788f0d162c88c085c6830c99c156c42d3fd (diff) | |
download | mqttr-0cabcd50d5714b09bae02de6fc13012e8abeb483.tar.gz mqttr-0cabcd50d5714b09bae02de6fc13012e8abeb483.tar.xz mqttr-0cabcd50d5714b09bae02de6fc13012e8abeb483.zip |
Change client ID to just id
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs index c110825..b04b72c 100644 --- a/src/config.rs +++ b/src/config.rs @@ -3,7 +3,7 @@ use std::{ collections::HashMap, fmt, fs::File, io::Read, os::unix::fs::PermissionsExt, path::Path, - process, time::Duration, + time::Duration, }; use anyhow::bail; @@ -280,7 +280,7 @@ pub struct Config { impl Config { pub fn mqtt_client(&self) -> (AsyncClient, EventLoop) { - let client_id = format!("{}_{}", self.id, process::id()); + let client_id = self.id.to_string(); let mut options = MqttOptions::new(client_id, &self.host, self.port); if let Some(credentials) = &self.credentials { options.set_credentials(&credentials.username, &credentials.password); |