Browse Source

Update state before purging outgoing queue (#11768)

Change-Id: I83ad088da0aa173e5e912b9059757274526d5c25
tags/7.1.0
Leif Åstrand 11 years ago
parent
commit
0f5831df6f

+ 4
- 5
client/src/com/vaadin/client/communication/AtmospherePushConnection.java View File

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

Loading…
Cancel
Save