-
Notifications
You must be signed in to change notification settings - Fork 291
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
Client disconected due protocol error when counting PUBLISH packets from 0 #203
Comments
Same problem on sending SUBSCRIBE immediately after connect. |
I agree with you both. Actually, the other MQTT library (pubsubclient) is using a packet id counter which is always different from 0. See here:
@brentru : This bug requires modifying few lines. I can make the modifications myself and make a pull request. |
@Mollayo Thank you for finding this, please make a pull request and tag me so I can review it. |
Hello, I discovered strange problem during publishing messages. Every first PUBLISH packet gets no response and additionally server closes connection with:
Client 7879f4a.... disconnected due to protocol error.
...when packets are counted from 0. When I set
packet_id_counter
variable initially to 1 inAdafruit_MQTT::Adafruit_MQTT
, everything works OKThis is also related to QOS level.
packet_id_counter
can be set to 0 but only when QOS 0 is used.I suspect that this is exact same case as described in MQTT docs:
The text was updated successfully, but these errors were encountered: