Server forgets non-standard keepalive
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mosquitto |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I use the Mosquitto C library as a client, and the Mosquitto server as the broker, both version 0.13.
When I set the client keepalive to a higher than standard number, e.g. 20 minutes, the server decides that the client has disconnected after 90 seconds.
When I set the client keepalive to the default 60 seconds, the client sends PINGRESP before the 90 second period and thus all is well.
I added some output to the server code and it receives the keepalive value OK in mqtt3_handle_
Edited to add: it appears to me that in read_handle_
db->contexts[
is required.
description: | updated |
description: | updated |
Changed in mosquitto: | |
status: | Fix Committed → Fix Released |
Thanks for a nice bug report.
The code around line 200 in read_handle_ server. c is to do with the case where a client connects with the same id as a currently connected client or a disconnected non-clean-session client. I agree that the line you write is missing. Does this completely cover your problem though? If you connect a client just once do you still have the problem?