Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
broker sends last will message with wrong retain flag #222
I have a client that sets the retain flag in its last will message.
1469098794: New client connected from ::1 as client1 (c1, k60).
1469098794: Sending PUBLISH to bridge1.main (d0, q1, r32, m2, 'TELE1/active', ... (1 bytes))
1469098794: Received PUBACK from bridge1.main (Mid: 2)
It looks like a set retain flag gets implicitly converted from int (0x20 =32) into bool at some point in the code.
added a commit
Jul 22, 2016
Thanks very much, I've now fixed this in a slightly different way to your PR.
This is ultimately down to older versions of VS not supporting stdbool.h and using a char as a bool in that situation. 1.5 will require stdbool.h and drop support for VS older than 2013.