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
Connect with a client C1 (non-clean session), and send message to any topic with {retain: true, qos: 2}
Disconnect C1
Connect with a client C2 (non-clean session), and subscribe to a topic used above with {qos: 2}
Aedes crashes inside aedes-persistence-redis with error ERROR: unknown key
Expected behavior
Should not crash
Additional context
After debugging a little, it seems that it crashes when it's trying to send PubRel packet of the retained message. Aedes invokes RedisPersistence.prototype.outgoingUpdate, which calls augmentWithBrokerData. Inside this function, var key = that.messageIdCache.get(messageIdKey) returns undefined, which causes the crash
The text was updated successfully, but these errors were encountered:
System Information
Describe the bug
aedes-persistence-redis crashes when trying to send retained message of QoS=2
To Reproduce
aedes-persistence-redis
persistence layer. I have usedmqtt-cli
package for it, with the following config:C1
(non-clean session), and send message to any topic with{retain: true, qos: 2}
C1
C2
(non-clean session), and subscribe to a topic used above with{qos: 2}
aedes-persistence-redis
with errorERROR: unknown key
Expected behavior
Should not crash
Additional context
After debugging a little, it seems that it crashes when it's trying to send
PubRel
packet of the retained message. Aedes invokesRedisPersistence.prototype.outgoingUpdate
, which callsaugmentWithBrokerData
. Inside this function,var key = that.messageIdCache.get(messageIdKey)
returnsundefined
, which causes the crashThe text was updated successfully, but these errors were encountered: