- if (throwable instanceof CancellationException) {
- /* This often happens when something wrong with akka or DS, so closing connection will help to restart device **/
- conductor.closeConnection(deviceInfo);
+ if (throwable instanceof ConnectionException) {
+ // ConnectionException is raised by StatisticsContextImpl class when the connections
+ // move to RIP state. In this particular case, there is no need to reschedule
+ // because this statistics manager should be closed soon
+ LOG.warn("Node {} is no more connected, stopping the statistics collection",
+ deviceInfo.getLOGValue(),throwable);
+ stopScheduling(deviceInfo);