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
The subscribe signal in QMQTT::Client still has a topic argument, but it will always be an empty string. Apparently the topic is not passed in the SUBACK message (See ClientPrivate::onNetworkReceived). The same goes for the unsubscribed signal.
Personally I do not have problems with this (not using the signals anyway), but I guess it may confuse people. Wouldn't it be better to remove the topic variable from the signals? The Client interface was already changed with pull request #96 which introduced the issue, so it seems OK to change it once more.
The text was updated successfully, but these errors were encountered:
Good catch! I think it would be better to re-introduce the topic, so that we save it in a member variable. Of course it should be done only if it does not complicate our code too much.
This could be fixed by introducing a message ID -> topic lookup in the ClientPrivate class. Upon a (un)subscribe we add the message ID/topic combination to the lookup. When the (UN)SUBACK arrives we can recover the topic using the message ID in the message.
This would be a simple fix which would change the ClientPrivate class only. It just tried it and it seemed to work (with mosquitto as the broker). If you want, I can create a pull request with the change.
The subscribe signal in QMQTT::Client still has a
topic
argument, but it will always be an empty string. Apparently the topic is not passed in theSUBACK
message (SeeClientPrivate::onNetworkReceived
). The same goes for theunsubscribed
signal.Personally I do not have problems with this (not using the signals anyway), but I guess it may confuse people. Wouldn't it be better to remove the
topic
variable from the signals? The Client interface was already changed with pull request #96 which introduced the issue, so it seems OK to change it once more.The text was updated successfully, but these errors were encountered: