aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2016-04-13 13:29:46 +0300
committerArtur Signell <artur@vaadin.com>2016-04-13 13:29:46 +0300
commita956fa4bebc2a273bf398d396c9fa23bf9bef1f9 (patch)
tree75451aa25862f53cb495b991db2b1490701f22f8 /client
parent9b46608f6c645c4289b854e2949bae3b1a2f5147 (diff)
downloadvaadin-framework-a956fa4bebc2a273bf398d396c9fa23bf9bef1f9.tar.gz
vaadin-framework-a956fa4bebc2a273bf398d396c9fa23bf9bef1f9.zip
Make sure RPC queue is only flushed when there are pending invocations (#19684)
Change-Id: I95c47739fb785ed111642a41b0928a5dcde3fea2
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/communication/ServerRpcQueue.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/communication/ServerRpcQueue.java b/client/src/com/vaadin/client/communication/ServerRpcQueue.java
index 2a9a8d4204..e5d5ea8a25 100644
--- a/client/src/com/vaadin/client/communication/ServerRpcQueue.java
+++ b/client/src/com/vaadin/client/communication/ServerRpcQueue.java
@@ -188,9 +188,10 @@ public class ServerRpcQueue {
* Triggers a send of server RPC and legacy variable changes to the server.
*/
public void flush() {
- if (flushScheduled) {
+ if (flushScheduled || isEmpty()) {
return;
}
+
flushPending = true;
flushScheduled = true;
Scheduler.get().scheduleFinally(scheduledFlushCommand);