Skip to content
Snippets Groups Projects
Commit 0fe676aa authored by Michael Eischer's avatar Michael Eischer
Browse files

Only iterate over waitingForSend if necessary

parent b28d772a
No related branches found
No related tags found
No related merge requests found
......@@ -203,12 +203,14 @@ public class REFITConnection {
}
private void sendWakeups() {
synchronized (waitingForSend) {
for (REFITEventReceiver<? super REFITConnectionWriteableNotification> stage : waitingForSend) {
stage.tell(new REFITConnectionWriteableNotification(id));
if (hasWaitingForSend) {
synchronized (waitingForSend) {
for (REFITEventReceiver<? super REFITConnectionWriteableNotification> stage : waitingForSend) {
stage.tell(new REFITConnectionWriteableNotification(id));
}
waitingForSend.clear();
hasWaitingForSend = false;
}
waitingForSend.clear();
hasWaitingForSend = false;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment