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
After doing extensive testing and debugging, I found that client.connected is set to false after connecting, and that subscriptions simply fail silently -- without even calling the callback -- if client.connected is false.
I had to force it to true, before subscriptions worked as expected.
client.on('connect', (ack) => {
console.log("Connected to MQTT", ack);
// I shouldn't have to manually set connected to true!!!
client.connected = true;
client.subscribe("/ATopic", {}, (err, granted) => {
...
});
...
});
This took me nearly three hours of wasted time to debug. FIX THIS PLEASE.
The text was updated successfully, but these errors were encountered:
After doing extensive testing and debugging, I found that client.connected is set to false after connecting, and that subscriptions simply fail silently -- without even calling the callback -- if client.connected is false.
I had to force it to true, before subscriptions worked as expected.
This took me nearly three hours of wasted time to debug. FIX THIS PLEASE.
The text was updated successfully, but these errors were encountered: