emqx / CocoaMQTT

MQTT 5.0 client library for iOS and macOS written in Swift
https://www.emqx.com/en
Other
1.57k stars 411 forks source link

RetainHandling attribute when subscribing #499

Closed ddisfriend closed 1 year ago

ddisfriend commented 1 year ago

When the RetainHandling attribute is set to sendOnSubscribe, the retain message cannot be received, and when it is set to none, the retain message can be received. The functions of these two attributes are just the opposite.

leeway1208 commented 1 year ago

Thanks. Please try the newest version.

rafaelnobrekz commented 4 months ago

@leeway1208 I've spent some hours trying to understand why my application doesn't work correctly with the latest version (that fixes some race conditions and user_property among other fixes

While this PR fixes the wrong binary values, the default value should now be set to sendOnSubscribe , not none ! As by default now a subscription doesn't get any retained messages