Skip to content

Commit 96a4b4d

Browse files
committed
Clear CommandQueue after failing all remaining commands
This prevents the query from waiting indefinitely in CommandQueue#quit
1 parent 784f58d commit 96a4b4d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/com/github/theholywaffle/teamspeak3/CommandQueue.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ void failRemainingCommands() {
222222
for (Command command : allCommands) {
223223
command.getFuture().fail(new TS3QueryShutDownException());
224224
}
225+
226+
sendQueue.clear();
227+
receiveQueue.clear();
225228
} finally {
226229
queueLock.unlock();
227230
}

0 commit comments

Comments
 (0)