[rotel] Fix handling of InterruptedException (Thread.sleep) (#10460)

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
lolodomo 2021-04-05 15:14:11 +02:00 committed by GitHub
parent fbea2f3535
commit c0445629dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -858,6 +858,7 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
scheduleReconnectJob();
} catch (InterruptedException e) {
logger.debug("Command {} from channel {} interrupted: {}", command, channel, e.getMessage());
Thread.currentThread().interrupt();
}
}
}
@ -1686,6 +1687,7 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
closeConnection();
} catch (InterruptedException e) {
logger.debug("Init sequence interrupted: {}", e.getMessage());
Thread.currentThread().interrupt();
}
}
}, 2500, TimeUnit.MILLISECONDS);
@ -1729,6 +1731,7 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
closeConnection();
} catch (InterruptedException e) {
logger.debug("Init sequence zone 2 interrupted: {}", e.getMessage());
Thread.currentThread().interrupt();
}
}
}, 2500, TimeUnit.MILLISECONDS);
@ -1772,6 +1775,7 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
closeConnection();
} catch (InterruptedException e) {
logger.debug("Init sequence zone 3 interrupted: {}", e.getMessage());
Thread.currentThread().interrupt();
}
}
}, 2500, TimeUnit.MILLISECONDS);
@ -1815,6 +1819,7 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
closeConnection();
} catch (InterruptedException e) {
logger.debug("Init sequence zone 4 interrupted: {}", e.getMessage());
Thread.currentThread().interrupt();
}
}
}, 2500, TimeUnit.MILLISECONDS);