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
I have the following mosqpp::mosquittopp class constructor that when reaches the connect_async call returns 8 (MOSQ_ERR_TLS) when running in Windows 11 or 10 but on Ubuntu 24 LTS it works fine.
MqttClient::MqttClient() :
mosquittopp("myid")
{
const char* cafile = "ca.crt";
if(!filesystem::exists(cafile))
throw runtime_error("ca.crt not found");
tls_set(cafile);
tls_opts_set(0);
const char* mq_user ="machine";
const char* mq_pwd = "password";
username_pw_set(mq_user,mq_pwd);
const char* host = "myserver.com";
int port = 8883;
int keepalive = 60;
auto res = connect_async(host,port,keepalive);
if(res) qDebug() << "connect_async returned " << res << " " << mosqpp::strerror(res);
subscribe(nullptr,"+/info/hw");
}
but if I replace connect_async() with connect() it works
I have used mosquitto 2.0.18 on both OS and also 2.0.20 on Windows with the same behavior.
loop_start() is called inside main() after instantiating the class
The text was updated successfully, but these errors were encountered:
I have the following mosqpp::mosquittopp class constructor that when reaches the connect_async call returns 8 (MOSQ_ERR_TLS) when running in Windows 11 or 10 but on Ubuntu 24 LTS it works fine.
but if I replace
connect_async()
withconnect()
it worksI have used mosquitto 2.0.18 on both OS and also 2.0.20 on Windows with the same behavior.
loop_start()
is called insidemain()
after instantiating the classThe text was updated successfully, but these errors were encountered: