catch Exception rather than Throwable
This commit is contained in:
parent
9cbfa984fa
commit
432efc75fb
|
@ -96,8 +96,8 @@ public final class Sniffer extends RestClient.FailureListener implements Closeab
|
||||||
}
|
}
|
||||||
logger.debug("scheduling next sniff in " + delayMillis + " ms");
|
logger.debug("scheduling next sniff in " + delayMillis + " ms");
|
||||||
this.scheduledFuture = this.scheduledExecutorService.schedule(this, delayMillis, TimeUnit.MILLISECONDS);
|
this.scheduledFuture = this.scheduledExecutorService.schedule(this, delayMillis, TimeUnit.MILLISECONDS);
|
||||||
} catch(Throwable t) {
|
} catch(Exception e) {
|
||||||
logger.error("error while scheduling next sniffer task", t);
|
logger.error("error while scheduling next sniffer task", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,8 +120,8 @@ public final class Sniffer extends RestClient.FailureListener implements Closeab
|
||||||
}
|
}
|
||||||
logger.debug("sniffed nodes: " + sniffedNodes);
|
logger.debug("sniffed nodes: " + sniffedNodes);
|
||||||
this.restClient.setHosts(sniffedNodes.toArray(new HttpHost[sniffedNodes.size()]));
|
this.restClient.setHosts(sniffedNodes.toArray(new HttpHost[sniffedNodes.size()]));
|
||||||
} catch (Throwable t) {
|
} catch (Exception e) {
|
||||||
logger.error("error while sniffing nodes", t);
|
logger.error("error while sniffing nodes", e);
|
||||||
} finally {
|
} finally {
|
||||||
scheduleNextRun(nextSniffDelayMillis);
|
scheduleNextRun(nextSniffDelayMillis);
|
||||||
running.set(false);
|
running.set(false);
|
||||||
|
|
Loading…
Reference in New Issue