openhab-addons/bundles/org.openhab.binding.gardena/src
maniac103 d0ad1e684e [gardena] Fix server ping timeout logic (#14203)
On server timeouts, it's possible for multiple minutes to elapse
between receiving the last pong on the old connection and attempting to
send the next ping on the new connection. If that time span exceeded 5
minutes, the binding went into a minutely reconnection loop, because it
never attempted to send a ping anymore, which led to lastPong not being
updated anymore.
To fix this, replace the timing dependent timestamp handling by a simple
counter which counts how many consecutive ping attempts didn't receive
an answer, and closing the connection after 5 unsuccessful ping
attempts. That new counter is now also reset whenever the connection is
restarted.

Fixes #14188

Signed-off-by: Danny Baumann <dannybaumann@web.de>
2023-05-03 22:49:50 +02:00
..
main [gardena] Fix server ping timeout logic (#14203) 2023-05-03 22:49:50 +02:00
test [gardena] Fix null annotation issue (and compiler warning) (#12957) 2022-06-23 09:11:20 +02:00