mqtt_cpp
mqtt_cpp copied to clipboard
client runtime checking of clientID value is done after establishing a socket with TLS or WebSockets
Instead, the client ID should be checked (if enabled) before the socket is established. This way, if the client is aware that it's going to use an invalid ID, it doesn't waste the brokers time or resources trying to establish a connection that will be rejected.
This behavior is observed in the unit test connect_overlength_client_id