Skip to content
Snippets Groups Projects
Commit 52b225a7 authored by Ramin Yaghoubzadeh Torky's avatar Ramin Yaghoubzadeh Torky
Browse files

Sync connect() + async loop_start() works best, despite the guides

(Stress tests obviously needed.)
parent b80581a4
Branches
No related tags found
No related merge requests found
......@@ -300,8 +300,8 @@ class MQTTParticipant: public ParticipantCore, public mosqpp::mosquittopp {
IPAACA_DEBUG("Created MQTTParticipant on " << host << ":" << port << " for scope " << _scope << " with prepared client id " << _client_id)
};
IPAACA_HEADER_EXPORT inline void run_in_background() {
int res = connect(host.c_str(), port, keepalive);
loop_start();
int res = connect_async(host.c_str(), port, keepalive);
if (res!=0) {
IPAACA_ERROR("connect_async (on topic " << _scope << ") returned an error " << res)
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment