aboutsummaryrefslogtreecommitdiff
path: root/amalgamation
diff options
context:
space:
mode:
authorOskari Timperi <oskari.timperi@iki.fi>2018-01-16 17:52:25 +0200
committerOskari Timperi <oskari.timperi@iki.fi>2018-01-16 17:52:49 +0200
commitfe74d0707215320a23ed10f989e87437c4f7ea4d (patch)
tree564321548896a6440054bad60d7461d7bd7e5850 /amalgamation
parent296da7a73501fb7ce8c0f4c0e18060ebf7eada97 (diff)
downloadmqtt-fe74d0707215320a23ed10f989e87437c4f7ea4d.tar.gz
mqtt-fe74d0707215320a23ed10f989e87437c4f7ea4d.zip
Fix keepalive handling
Previously the code would send pings only when SocketSelect() would timeout. This was not working when a client was subscribed to a topic and would receive periodic messages but wouldn't itself send anything. This meant that SocketSelect() wouldn't timeout at any point and we wouldn't execute the check for sending a PINGREQ. The fix is to do the check for last sent packet before calling SocketSelect() so that if we haven't been sending anything for a while, we really send the PINGREQ. Fixes #10
Diffstat (limited to 'amalgamation')
0 files changed, 0 insertions, 0 deletions