From ed92f9d28eab23b0d9c39c12d0288c83f9d3908b Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 20 Dec 2013 15:12:35 -0500 Subject: [PATCH] Simply discard input events that occur when the thread pool has been shutdown (during connection closure) --- moonlight-common/src/com/limelight/nvstream/NvConnection.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/moonlight-common/src/com/limelight/nvstream/NvConnection.java b/moonlight-common/src/com/limelight/nvstream/NvConnection.java index 345c1d7d..e414327a 100644 --- a/moonlight-common/src/com/limelight/nvstream/NvConnection.java +++ b/moonlight-common/src/com/limelight/nvstream/NvConnection.java @@ -47,7 +47,8 @@ public class NvConnection { this.listener = listener; this.config = config; - this.threadPool = new ThreadPoolExecutor(1, 1, Long.MAX_VALUE, TimeUnit.DAYS, new LinkedBlockingQueue()); + this.threadPool = new ThreadPoolExecutor(1, 1, Long.MAX_VALUE, TimeUnit.DAYS, + new LinkedBlockingQueue(), new ThreadPoolExecutor.DiscardPolicy()); } public static String getMacAddressString() throws SocketException {