summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-02-20 22:48:50 +0200
committerLeif Åstrand <leif@vaadin.com>2015-02-24 09:32:01 +0000
commit4b85cc324a74c1306e913b774dc5b41f59b868fe (patch)
tree44e5f2557bdb667cada4f0f05a47c87f1ef5023d
parentf33e08aa4252e191f7790e67b78326368f266733 (diff)
downloadvaadin-framework-4b85cc324a74c1306e913b774dc5b41f59b868fe.tar.gz
vaadin-framework-4b85cc324a74c1306e913b774dc5b41f59b868fe.zip
Do not restart application if messages are received (#16868)
Change-Id: I5ede5efb7ae9a171fac79f2ead98e2fb12c249c4
-rw-r--r--client/src/com/vaadin/client/ApplicationConnection.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/client/src/com/vaadin/client/ApplicationConnection.java b/client/src/com/vaadin/client/ApplicationConnection.java
index e7bbb65300..8c03f3fdaa 100644
--- a/client/src/com/vaadin/client/ApplicationConnection.java
+++ b/client/src/com/vaadin/client/ApplicationConnection.java
@@ -62,7 +62,6 @@ import com.google.gwt.user.client.Window.ClosingHandler;
import com.google.gwt.user.client.ui.HasWidgets;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.client.ApplicationConfiguration.ErrorMessage;
-import com.vaadin.client.ApplicationConnection.ApplicationStoppedEvent;
import com.vaadin.client.ResourceLoader.ResourceLoadEvent;
import com.vaadin.client.ResourceLoader.ResourceLoadListener;
import com.vaadin.client.communication.HasJavaScriptConnectorHelper;
@@ -1062,8 +1061,17 @@ public class ApplicationConnection implements HasHandlers {
if (isApplicationRunning()) {
handleReceivedJSONMessage(start, jsonText, json);
} else {
- setApplicationRunning(true);
- handleWhenCSSLoaded(jsonText, json);
+ if (!cssLoaded) {
+ // Application is starting up for the first time
+ setApplicationRunning(true);
+ handleWhenCSSLoaded(jsonText, json);
+ } else {
+ getLogger()
+ .warning(
+ "Ignored received message because application has already been stopped");
+ return;
+
+ }
}
}