[yioremote] Bug fix during websocket error by disposing pollingjob (#9350)
* Bug fix during websocket error by disposing pollingjob Signed-off-by: Michael Loercher<michaelloercher@web.de>
This commit is contained in:
parent
9d054f2447
commit
ac074ea1f0
|
@ -139,14 +139,17 @@ public class YIOremoteDockHandler extends BaseThingHandler {
|
|||
|
||||
@Override
|
||||
public void onClose() {
|
||||
disposeWebsocketPollingJob();
|
||||
reconnectWebsocket();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable cause) {
|
||||
disposeWebsocketPollingJob();
|
||||
yioRemoteDockActualStatus = YioRemoteDockHandleStatus.COMMUNICATION_ERROR;
|
||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
|
||||
"Communication lost no ping from YIO DOCK");
|
||||
reconnectWebsocket();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue