We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 005f73c commit a824d37Copy full SHA for a824d37
rumqttc/src/v5/mod.rs
@@ -255,6 +255,10 @@ impl MqttOptions {
255
/// operations on the client when reconnection with same `client_id`
256
/// happens. Local queue state is also held to retransmit packets after reconnection.
257
pub fn set_clean_start(&mut self, clean_start: bool) -> &mut Self {
258
+ assert!(
259
+ !self.client_id.is_empty() || clean_start,
260
+ "Cannot unset clean session when client id is empty"
261
+ );
262
self.clean_start = clean_start;
263
self
264
}
0 commit comments