1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-10-06 21:27:36 +02:00

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,12 +88,13 @@ public final class BtLEQueue {
while (!mDisposed && !mCrashed) {
try {
LOG.info("waiting...");
synchronized (mTransactionMonitor) {
try {
mTransactionMonitor.wait();
} catch (InterruptedException e) {
e.printStackTrace();
if(mTransactions.isEmpty() && mServerTransactions.isEmpty()) {
synchronized (mTransactionMonitor) {
try {
mTransactionMonitor.wait();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
Transaction transaction = mTransactions.poll();