You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use paho_mqtt::AsyncClient;use paho_mqtt::ConnectOptionsBuilder;use paho_mqtt::CreateOptions;use paho_mqtt::Error;#[tokio::main]asyncfnmain() -> Result<(),Error>{let client = AsyncClient::new(CreateOptions::default())?;println!("First one connecting");
client
.connect(ConnectOptionsBuilder::new().server_uris(&["test.mosquitto.org:1883"]).finalize(),).await?;println!("Fist one connected");println!("Second one connecting");
client
.connect(ConnectOptionsBuilder::new().server_uris(&["test.mosquitto.org:1883"]).finalize(),).await?;println!("Second one connected");Ok(())}
First one connecting
Fist one connected
Second one connecting
MRE
repr-async-client-stuck-double-connect.zip
Current behavior
Connecting twice to the same broker causes AsyncClient to get stuck on the second
connect
call.Expected behaviour
Second connect call should be ignored, as it is already connected.
Additional information
Setting different protocols doesn't change anything
The text was updated successfully, but these errors were encountered: