Bug Fix - Websocket reconnect after server failure (#13537)

Signed-off-by: kjoglum <stiankj@online.no>
This commit is contained in:
Stian Kjoglum 2022-10-15 10:22:58 +02:00 committed by GitHub
parent 90ac9c7b78
commit 6103c30830
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -346,10 +346,8 @@ public class TibberHandler extends BaseThingHandler {
Thread.sleep(10 * 1000);
} catch (InterruptedException e) {
}
Session session = this.session;
if (!session.isOpen()) {
close();
logger.warn("Unable to establish websocket session");
if (!isConnected()) {
logger.warn("Unable to establish websocket session - Reattempting connection on next refresh");
} else {
logger.debug("Websocket session established");
}