DanaR: fix message locking
This commit is contained in:
parent
f16229c4ed
commit
9eac225255
1 changed files with 6 additions and 4 deletions
|
@ -160,11 +160,13 @@ public class SerialIOThread extends Thread {
|
||||||
aapsLogger.error("sendMessage write exception: ", e);
|
aapsLogger.error("sendMessage write exception: ", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
synchronized (message) {
|
||||||
try {
|
try {
|
||||||
message.wait(5000);
|
message.wait(5000);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
aapsLogger.error("sendMessage InterruptedException", e);
|
aapsLogger.error("sendMessage InterruptedException", e);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SystemClock.sleep(200);
|
SystemClock.sleep(200);
|
||||||
if (!message.isReceived()) {
|
if (!message.isReceived()) {
|
||||||
|
|
Loading…
Reference in a new issue