eclipse-paho / paho.mqtt.cpp

Other
1.03k stars 438 forks source link

Fix copy/move constructor for connect/disconnect opts with properties #445

Closed ssams closed 1 year ago

ssams commented 1 year ago

ensures pointers to the properties are updated properly in move and copy constructors, so the c struct pointers remain valid

similar to #426, but I've also added tests and only try to set the structure if properties were provided (similar to SSL and will opts)

fpagliughi commented 1 year ago

Ha. Awesome. I just spotted this before heading out on holiday a few weeks ago, but didn't have time to fix it before I left. Now I'm back, and here is the fix, complete with unit tests!

Thank you.