You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ni...@apache.org on 2019/01/20 09:06:34 UTC
[servicecomb-pack] branch master updated: SCB-1118 Catch the
exception to keep EventScanner running
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git
The following commit(s) were added to refs/heads/master by this push:
new 33f98c0 SCB-1118 Catch the exception to keep EventScanner running
33f98c0 is described below
commit 33f98c04c43902c3efa6ad3bd4fa34570cf20d63
Author: Willem Jiang <ji...@huawei.com>
AuthorDate: Sun Jan 20 11:00:15 2019 +0800
SCB-1118 Catch the exception to keep EventScanner running
---
.../java/org/apache/servicecomb/pack/alpha/core/EventScanner.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/alpha/alpha-core/src/main/java/org/apache/servicecomb/pack/alpha/core/EventScanner.java b/alpha/alpha-core/src/main/java/org/apache/servicecomb/pack/alpha/core/EventScanner.java
index 06e7aa2..084e173 100644
--- a/alpha/alpha-core/src/main/java/org/apache/servicecomb/pack/alpha/core/EventScanner.java
+++ b/alpha/alpha-core/src/main/java/org/apache/servicecomb/pack/alpha/core/EventScanner.java
@@ -71,7 +71,12 @@ public class EventScanner implements Runnable {
@Override
public void run() {
- pollEvents();
+ try {
+ // Need to catch the exception to keep the event scanner running.
+ pollEvents();
+ } catch (Exception ex) {
+ LOG.warn("Got the exception {} when pollEvents.", ex.getMessage(), ex);
+ }
}
private void pollEvents() {