aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2016-04-13 13:29:46 +0300
committerelmot <elmot@vaadin.com>2016-04-14 17:48:06 +0300
commita22cd6021b137fd03c5d38ab32ac40de05f0f5be (patch)
tree7649ebb8a13090724d35ee8a353d251f942b6c5a
parent292b0fc7f0ddd404dc2bcd060a949589870e641e (diff)
downloadvaadin-framework-a22cd6021b137fd03c5d38ab32ac40de05f0f5be.tar.gz
vaadin-framework-a22cd6021b137fd03c5d38ab32ac40de05f0f5be.zip
Make sure RPC queue is only flushed when there are pending invocations (#19684)
Change-Id: I95c47739fb785ed111642a41b0928a5dcde3fea2
-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);