Skip to content
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

decode receiveMaximum use readShort cause the problem #1006

Open
ymhh opened this issue Jun 21, 2023 · 0 comments
Open

decode receiveMaximum use readShort cause the problem #1006

ymhh opened this issue Jun 21, 2023 · 0 comments

Comments

@ymhh
Copy link

ymhh commented Jun 21, 2023

when send only one message to broker,there is error as follow。
正在进行过多的发布
(32202)
at org.eclipse.paho.mqttv5.client.internal.ClientState.send(ClientState.java:544)
at org.eclipse.paho.mqttv5.client.internal.ClientComms.internalSend(ClientComms.java:155)
at org.eclipse.paho.mqttv5.client.internal.ClientComms.sendNoWait(ClientComms.java:218)
at org.eclipse.paho.mqttv5.client.MqttAsyncClient.publish(MqttAsyncClient.java:1530)
at org.eclipse.paho.mqttv5.client.MqttAsyncClient.publish(MqttAsyncClient.java:1499)

the reason is the server return receiveMaximum as 65535, and MqttProperties#decodeProperties use readShort to read value ,the result is -1, so cause the problem。 shoule use readUnsignShort instead to read receiveMaximum value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant