Fixed exception in runnable is swallowed by scheduled thread
Change-Id: I82d6e296fca1783fc127b13c5133363f2e9a6cf3
diff --git a/src/main/java/org/opencord/cordvtn/impl/AbstractInstanceHandler.java b/src/main/java/org/opencord/cordvtn/impl/AbstractInstanceHandler.java
index d714e3e..ff58107 100644
--- a/src/main/java/org/opencord/cordvtn/impl/AbstractInstanceHandler.java
+++ b/src/main/java/org/opencord/cordvtn/impl/AbstractInstanceHandler.java
@@ -51,7 +51,7 @@
import java.util.stream.StreamSupport;
import static com.google.common.base.Preconditions.checkNotNull;
-import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor;
+import static java.util.concurrent.Executors.newSingleThreadExecutor;
import static org.onlab.util.Tools.groupedThreads;
import static org.opencord.cordvtn.api.Constants.ERROR_OPENSTACK_ACCESS;
import static org.opencord.cordvtn.api.Constants.ERROR_XOS_ACCESS;
@@ -77,8 +77,8 @@
private XosAccess xosAccess = null;
private OpenStackAccess osAccess = null;
- private final ExecutorService eventExecutor = newSingleThreadScheduledExecutor(
- groupedThreads(this.getClass().getSimpleName(), "event-handler"));
+ private final ExecutorService eventExecutor = newSingleThreadExecutor(
+ groupedThreads(this.getClass().getSimpleName(), "event-handler", log));
protected void activate() {
ServiceDirectory services = new DefaultServiceDirectory();
diff --git a/src/main/java/org/opencord/cordvtn/impl/CordVtnNodeManager.java b/src/main/java/org/opencord/cordvtn/impl/CordVtnNodeManager.java
index fbac581..8f30931 100644
--- a/src/main/java/org/opencord/cordvtn/impl/CordVtnNodeManager.java
+++ b/src/main/java/org/opencord/cordvtn/impl/CordVtnNodeManager.java
@@ -83,7 +83,7 @@
import java.util.stream.Collectors;
import static com.google.common.base.Preconditions.checkNotNull;
-import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor;
+import static java.util.concurrent.Executors.newSingleThreadExecutor;
import static org.onlab.util.Tools.groupedThreads;
import static org.onosproject.net.Device.Type.SWITCH;
import static org.onosproject.net.behaviour.TunnelDescription.Type.VXLAN;
@@ -155,7 +155,7 @@
protected CordVtnPipeline pipeline;
private final ExecutorService eventExecutor =
- newSingleThreadScheduledExecutor(groupedThreads("onos/cordvtn-node", "event-handler"));
+ newSingleThreadExecutor(groupedThreads("onos/cordvtn-node", "event-handler", log));
private final NetworkConfigListener configListener = new InternalConfigListener();
private final DeviceListener deviceListener = new InternalDeviceListener();
diff --git a/src/main/java/org/opencord/cordvtn/impl/InstanceManager.java b/src/main/java/org/opencord/cordvtn/impl/InstanceManager.java
index 3041bbf..3d4af38 100644
--- a/src/main/java/org/opencord/cordvtn/impl/InstanceManager.java
+++ b/src/main/java/org/opencord/cordvtn/impl/InstanceManager.java
@@ -66,7 +66,7 @@
import java.util.concurrent.ExecutorService;
import static com.google.common.base.Preconditions.checkNotNull;
-import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor;
+import static java.util.concurrent.Executors.newSingleThreadExecutor;
import static org.onlab.util.Tools.groupedThreads;
import static org.onosproject.dhcp.IpAssignment.AssignmentStatus.Option_RangeNotEnforced;
import static org.onosproject.xosclient.api.VtnServiceApi.NetworkType.MANAGEMENT;
@@ -116,7 +116,7 @@
};
private final ExecutorService eventExecutor =
- newSingleThreadScheduledExecutor(groupedThreads("onos/cordvtn-instance", "event-handler"));
+ newSingleThreadExecutor(groupedThreads("onos/cordvtn-instance", "event-handler", log));
private final NetworkConfigListener configListener = new InternalConfigListener();
private ApplicationId appId;