summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2013-05-03 11:44:11 +0300
committerArtur Signell <artur@vaadin.com>2013-05-03 11:47:19 +0300
commit28beb5f36ca2f1b50db3b7f4b1410961168cdba0 (patch)
treebd6dabdf1481956195b08728a73cade1892b0bf9
parent91a7acc3811c11228d857a21d4c5b7630dab63f1 (diff)
downloadvaadin-framework-7.1.0.beta1.tar.gz
vaadin-framework-7.1.0.beta1.zip
Update state before purging outgoing queue (#11768)7.1.0.beta1
Change-Id: I83ad088da0aa173e5e912b9059757274526d5c25
-rw-r--r--client/src/com/vaadin/client/communication/AtmospherePushConnection.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
index e42f91ea67..bc7e0b3fd2 100644
--- a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
+++ b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
@@ -220,14 +220,13 @@ public class AtmospherePushConnection implements PushConnection {
VConsole.log("Push connection established using " + transport);
- for (String message : messageQueue) {
- push(message);
- }
- messageQueue.clear();
-
switch (state) {
case CONNECT_PENDING:
state = State.CONNECTED;
+ for (String message : messageQueue) {
+ push(message);
+ }
+ messageQueue.clear();
break;
case DISCONNECT_PENDING:
// Set state to connected to make disconnect close the connection