hirotakaster / MQTT

MQTT for Photon, Spark Core
Other
217 stars 118 forks source link

client.connect() blocks argon in SYSTEM_THREAD(ENABLED) #78

Closed Lurow closed 5 years ago

Lurow commented 5 years ago

Hi there,

I recently played around with the new "mesh" line from particle and used this lib. At first, it was fine, everything was working as expected, but when we tried to enable threading and moved the client.connect() into the loop(){} block it appears to block all incoming connections.

if(!client.isConnected()){
            client.connect("bar");
            client.subscribe("foo");
}

is there any practice or solution for this problem?

best regards

Lurow commented 5 years ago

Saw some problems with string IPs in one of the pull requests. Changing it to IPAddress resolved the issue

hirotakaster commented 5 years ago

that's problem is already resolved in MQTT.h files.