unknown events will be catched and no longer break the whole client (f.e. on teaspeak servers)
This commit is contained in:
+9
-5
@@ -433,9 +433,13 @@ public class LocalTeamspeakClientSocket
|
|||||||
if (processor != null) {
|
if (processor != null) {
|
||||||
processor.process(client, singleCommand);
|
processor.process(client, singleCommand);
|
||||||
} else if (singleCommand.getName().startsWith("notify")) {
|
} else if (singleCommand.getName().startsWith("notify")) {
|
||||||
TS3Event event = TS3Event.createEvent(singleCommand);
|
try {
|
||||||
|
TS3Event event = TS3Event.createEvent(singleCommand);
|
||||||
|
commandExecutionService.submit(() -> listeners.forEach(event::fire));
|
||||||
|
} catch (IllegalArgumentException exception) {
|
||||||
|
exception.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
commandExecutionService.submit(() -> listeners.forEach(event::fire));
|
|
||||||
} else {
|
} else {
|
||||||
CommandProcessor awaitingCommandProcessor;
|
CommandProcessor awaitingCommandProcessor;
|
||||||
|
|
||||||
@@ -521,9 +525,9 @@ public class LocalTeamspeakClientSocket
|
|||||||
|
|
||||||
if (microphone != null && microphoneThread == null) {
|
if (microphone != null && microphoneThread == null) {
|
||||||
microphoneThread = new HighPrecisionTimer(
|
microphoneThread = new HighPrecisionTimer(
|
||||||
20,
|
20,
|
||||||
5F, // up to 100ms of drift/catchup
|
5F, // up to 100ms of drift/catchup
|
||||||
new MicrophoneTask()
|
new MicrophoneTask()
|
||||||
);
|
);
|
||||||
microphoneThread.setDaemon(true);
|
microphoneThread.setDaemon(true);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user