summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2013-10-31 18:42:22 +0200
committerVaadin Code Review <review@vaadin.com>2013-10-31 17:45:14 +0000
commit9e6a82d29c827c13834bb7c16f59a621233f8e1c (patch)
tree75bf7716156bcd0e986a4f1210f4569b8f12fb0c
parent7b120fc196a0517c95a5d8f93c4b72c5b9a72a0b (diff)
downloadvaadin-framework-9e6a82d29c827c13834bb7c16f59a621233f8e1c.tar.gz
vaadin-framework-9e6a82d29c827c13834bb7c16f59a621233f8e1c.zip
Force connection to closed state on reconnect (#12853)
IE10+ does not call onabort when the streaming connection is aborted. As a result, onclose is never called and the client side does not change the connection state away from "connected". This results in user actions not being queued on the client side, instead the client tries to send them immediately, leading to an eternal spinner. If this can be fixed in Atmosphere somehow, it should. This is a workaround until then. Change-Id: Icd1a86ac9775d1a7d9c0bc1dee0fd399e2bf2266
-rw-r--r--client/src/com/vaadin/client/communication/AtmospherePushConnection.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
index 4bf12ca1f3..320ba9ebe7 100644
--- a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
+++ b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
@@ -350,6 +350,10 @@ public class AtmospherePushConnection implements PushConnection {
protected void onReconnect(JavaScriptObject request,
final AtmosphereResponse response) {
+ if (state == State.CONNECTED) {
+ VConsole.log("No onClose was received before reconnect. Forcing state to closed.");
+ state = State.CONNECT_PENDING;
+ }
VConsole.log("Reopening push connection");
}