-
Notifications
You must be signed in to change notification settings - Fork 90
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
JAVA: keep alive not working #117
Comments
Pull request for working solution: #118 |
can you elaborate what does the 1.5 factor does ? it is not clear to me what is the actual issue and what the fix changes. |
Issue: Client will not detect a missing ping response as a disconnect. The use of the keepAlive-Message is to detect if the connection to the broker is lost. Currently you will not be informed if the connection to your mqtt-broker is lost, status will still be "connected". The Factor
Source: HiveMQ - keep alive You can also use a factor of 2 or 3 as the timeout, but I wanted to stay close to the spec. |
Update:
This is not working, I tried it, see the pull-request for a working solution. |
The keep alive does not seem to work, maybe i also found out why it is so.
Reproduce:
Result:
Nothing. The connection will not be closed
If you replug the network, the connection will be closed and reconnected (in my setup).
Potential error: MqttClientImpl line 140
vertx-mqtt/src/main/java/io/vertx/mqtt/impl/MqttClientImpl.java
Line 140 in c8213e0
Context:
The
DEFAULT_IDLE_TIMEOUT
is 0. Zero disabled timeout detection,I belive this should be
keepAlive * 1.5
My current workaround is:
I would be glad to receive some feedback
The text was updated successfully, but these errors were encountered: