diff options
author | Artur Signell <artur@vaadin.com> | 2016-04-13 13:29:46 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2016-04-13 13:29:46 +0300 |
commit | a956fa4bebc2a273bf398d396c9fa23bf9bef1f9 (patch) | |
tree | 75451aa25862f53cb495b991db2b1490701f22f8 /client | |
parent | 9b46608f6c645c4289b854e2949bae3b1a2f5147 (diff) | |
download | vaadin-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.java | 3 |
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); |