diff --git a/src/main/java/org/dynmap/AsynchronousQueue.java b/src/main/java/org/dynmap/AsynchronousQueue.java index 6d3637e2..74be3aa7 100644 --- a/src/main/java/org/dynmap/AsynchronousQueue.java +++ b/src/main/java/org/dynmap/AsynchronousQueue.java @@ -36,12 +36,16 @@ public class AsynchronousQueue { return true; } - private T pop() throws InterruptedException { - T t = queue.take(); - synchronized (lock) { - set.remove(t); + private T pop() { + try { + T t = queue.take(); + synchronized (lock) { + set.remove(t); + } + return t; + } catch (InterruptedException ix) { + return null; } - return t; } public boolean remove(T t) {