Closed jedwards1211 closed 3 years ago
It might be sufficient to emit an error when any packet's flags are invalid; I think in all cases the server is just supposed to close the connection, but I'm not 100% sure.
That would be my preferred approach.
If I set that flag to 1,
mqtt-packet
still parses it just fine, but doesn't emit raw flag bits, so it's impossible for a server implementation to comply with this spec requirement usingmqtt-packet
.This goes for many other packet types' flags as well...for example
mqtt-packet
should either attach a raw buffer to the packet, or at least some fields that represent the raw flag values.It might be sufficient to emit an error when any packet's flags are invalid; I think in all cases the server is just supposed to close the connection, but I'm not 100% sure.