From 9e6a82d29c827c13834bb7c16f59a621233f8e1c Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Thu, 31 Oct 2013 18:42:22 +0200 Subject: [PATCH] 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 --- .../vaadin/client/communication/AtmospherePushConnection.java | 4 ++++ 1 file changed, 4 insertions(+) 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"); } -- 2.39.5