Fix queue handling if only server or client operation is present

This commit is contained in:
Andreas Böhler 2019-02-05 18:46:54 +01:00
parent 6577ad69b0
commit 88ac816393

View File

@ -88,7 +88,7 @@ public final class BtLEQueue {
while (!mDisposed && !mCrashed) { while (!mDisposed && !mCrashed) {
try { try {
LOG.info("waiting..."); if(mTransactions.isEmpty() && mServerTransactions.isEmpty()) {
synchronized (mTransactionMonitor) { synchronized (mTransactionMonitor) {
try { try {
mTransactionMonitor.wait(); mTransactionMonitor.wait();
@ -96,6 +96,7 @@ public final class BtLEQueue {
e.printStackTrace(); e.printStackTrace();
} }
} }
}
Transaction transaction = mTransactions.poll(); Transaction transaction = mTransactions.poll();
ServerTransaction serverTransaction = mServerTransactions.poll(); ServerTransaction serverTransaction = mServerTransactions.poll();