-
Notifications
You must be signed in to change notification settings - Fork 308
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
Expected Behavior
When creating a client, using an empty client ID should work.
Per the 3.1.1 spec http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html
A Server MAY allow a Client to supply a ClientId that has a length of zero bytes, however if it does so the Server MUST treat this as a special case and assign a unique ClientId to that Client. It MUST then process the CONNECT packet as if the Client had provided that unique ClientId [MQTT-3.1.3-6].
Current Behavior
Using an empty client id for the rumqttc client options results in a panic.
let id = id.into();
if id.starts_with(' ') || id.is_empty() {
panic!("Invalid client id");
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers