mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-26 15:21:41 +01:00
[gardena] synchronized (#13253)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch> Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
This commit is contained in:
parent
2d53243de7
commit
bff2298b20
@ -168,7 +168,7 @@ public class GardenaSmartWebSocket {
|
|||||||
/**
|
/**
|
||||||
* Sends a ping to tell the Gardena smart system that the client is alive.
|
* Sends a ping to tell the Gardena smart system that the client is alive.
|
||||||
*/
|
*/
|
||||||
private void sendKeepAlivePing() {
|
private synchronized void sendKeepAlivePing() {
|
||||||
final PostOAuth2Response accessToken = token;
|
final PostOAuth2Response accessToken = token;
|
||||||
if ((Instant.now().getEpochSecond() - lastPong.getEpochSecond() > WEBSOCKET_IDLE_TIMEOUT) || accessToken == null
|
if ((Instant.now().getEpochSecond() - lastPong.getEpochSecond() > WEBSOCKET_IDLE_TIMEOUT) || accessToken == null
|
||||||
|| accessToken.isAccessTokenExpired()) {
|
|| accessToken.isAccessTokenExpired()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user