From 15f7485fa9ee8a1473531bbf9acef1f2397eaefc Mon Sep 17 00:00:00 2001 From: Manevolent Date: Thu, 6 Sep 2018 11:49:51 -0400 Subject: [PATCH] Moving command execution to a single thread executor. I leave it up to end-users now if they want event processing to be multi-threaded. --- .../ts3j/protocol/socket/client/LocalTeamspeakClientSocket.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/github/manevolent/ts3j/protocol/socket/client/LocalTeamspeakClientSocket.java b/src/main/java/com/github/manevolent/ts3j/protocol/socket/client/LocalTeamspeakClientSocket.java index e7e6d31..c44c28e 100644 --- a/src/main/java/com/github/manevolent/ts3j/protocol/socket/client/LocalTeamspeakClientSocket.java +++ b/src/main/java/com/github/manevolent/ts3j/protocol/socket/client/LocalTeamspeakClientSocket.java @@ -41,7 +41,7 @@ public class LocalTeamspeakClientSocket private final DatagramPacket packet = new DatagramPacket(new byte[500], 500); private final Map namedProcessors = new HashMap<>(); - private final ExecutorService commandExecutionService = Executors.newCachedThreadPool(); + private final ExecutorService commandExecutionService = Executors.newSingleThreadExecutor(); private final Object commandSendLock = new Object(); private volatile InetSocketAddress remote;