Bladeren bron

Update state before purging outgoing queue (#11768)

Change-Id: I83ad088da0aa173e5e912b9059757274526d5c25
tags/7.1.0
Leif Åstrand 11 jaren geleden
bovenliggende
commit
0f5831df6f
1 gewijzigde bestanden met toevoegingen van 4 en 5 verwijderingen
  1. 4
    5
      client/src/com/vaadin/client/communication/AtmospherePushConnection.java

+ 4
- 5
client/src/com/vaadin/client/communication/AtmospherePushConnection.java Bestand weergeven

@@ -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

Laden…
Annuleren
Opslaan