-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SESSION_EXPIRY_INTERVAL is int, not uint #498
Comments
Yeah, you're right. It's complaining about the sign conversion. I had assumed there might be a mix of signed and unsigned values in the properties. For each one, unsigned seemed to be implied, but when I just looked now, I see in the Data Representation section, it's explicit:
I'll change that in the code. But I'm a bit worried about the spec assuming |
this is a bit out of my wheelhouse, but can we use edit: I guess that UINT_MAX or UINT32_MAX wouldn't be compatible with the 16 bit systems, but hopefully in that scenario devs would just use |
Actually the problem is that I used the signed But, yes, But will it always stay the same? Who knows. Better to be safe and use the sized types when you need a partucular size. In the case of C++, don't use the C macro for
It's a bit more verbose but guaranteed to be 0xFFFFFFFF. Or make your own const as you suggest with a name more descriptive to the particular use case. |
…on-breaking change). Updated a few v5 examples.
I just added this to the
It's in the |
Thanks so much! |
…on-breaking change). Updated a few v5 examples.
I believe this is fixed. If not, please re-open. |
Finally was able to test, this works - thanks again! |
According to the MQTT docs, it appears that the value should be an unsigned integer. When compiling with the following:
I get the error:
This isn't the worst issue, but I think it is affecting how the broker handles it, as it's not truly set to the indefinite value.
The text was updated successfully, but these errors were encountered: