From a956fa4bebc2a273bf398d396c9fa23bf9bef1f9 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Wed, 13 Apr 2016 13:29:46 +0300 Subject: [PATCH] Make sure RPC queue is only flushed when there are pending invocations (#19684) Change-Id: I95c47739fb785ed111642a41b0928a5dcde3fea2 --- client/src/com/vaadin/client/communication/ServerRpcQueue.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.39.5