From 2a8856cc4a14e4b36bf975023687bb129b62563b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Kalliom=C3=A4ki?= Date: Thu, 1 Jun 2017 13:14:44 +0200 Subject: [PATCH] Switch from ScheduledExecutorService to ExecutorService. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ScheduledExecutorService silently ignores exceptions thrown by the runnable. This makes debugging issues unnecessarily difficult. Bug: None Change-Id: I7deb43b96e5639c096b9aed9c6ff9b197b62f59f Reviewed-on: https://chromium-review.googlesource.com/521084 Reviewed-by: Magnus Jedvert Commit-Queue: Sami Kalliomäki Cr-Commit-Position: refs/heads/master@{#18378} --- .../src/org/appspot/apprtc/PeerConnectionClient.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java index 0c43e0ddae..02dac1582a 100644 --- a/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java +++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java @@ -27,7 +27,7 @@ import java.util.List; import java.util.Timer; import java.util.TimerTask; import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ExecutorService; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.appspot.apprtc.AppRTCClient.SignalingParameters; @@ -103,7 +103,7 @@ public class PeerConnectionClient { private static final PeerConnectionClient instance = new PeerConnectionClient(); private final PCObserver pcObserver = new PCObserver(); private final SDPObserver sdpObserver = new SDPObserver(); - private final ScheduledExecutorService executor; + private final ExecutorService executor; private PeerConnectionFactory factory; private PeerConnection peerConnection; @@ -289,7 +289,7 @@ public class PeerConnectionClient { // Executor thread is started once in private ctor and is used for all // peer connection API calls to ensure new peer connection factory is // created on the same thread as previously destroyed factory. - executor = Executors.newSingleThreadScheduledExecutor(); + executor = Executors.newSingleThreadExecutor(); } public static PeerConnectionClient getInstance() {