summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-04-24 14:06:03 +0300
committerArtur Signell <artur@vaadin.com>2015-07-13 17:11:08 +0300
commitd9ebf4ef71eea267bf1c1dbd52d89b04f12f6576 (patch)
treef8b63e4994e3d099f40fcd119c972de257d5a00b
parent2427aa54ae92942cd56cc514634e498070cce9d0 (diff)
downloadvaadin-framework-d9ebf4ef71eea267bf1c1dbd52d89b04f12f6576.tar.gz
vaadin-framework-d9ebf4ef71eea267bf1c1dbd52d89b04f12f6576.zip
Ensure application is stopped when stopped events are sent (#11733)
Failing to do this cause an infinite loop if a stop event causes stopping of the application Change-Id: Ibb36c2eca6c6e1bc10192b4d2d808042793fb2fa
-rw-r--r--client/src/com/vaadin/client/ApplicationConnection.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/client/src/com/vaadin/client/ApplicationConnection.java b/client/src/com/vaadin/client/ApplicationConnection.java
index 4f7b8d34fc..f5a4d7dba0 100644
--- a/client/src/com/vaadin/client/ApplicationConnection.java
+++ b/client/src/com/vaadin/client/ApplicationConnection.java
@@ -3527,11 +3527,12 @@ public class ApplicationConnection implements HasHandlers {
communicationErrorDelegate = delegate;
}
- public void setApplicationRunning(boolean running) {
- if (applicationRunning && !running) {
+ public void setApplicationRunning(boolean applicationRunning) {
+ boolean stopped = (this.applicationRunning && !applicationRunning);
+ this.applicationRunning = applicationRunning;
+ if (stopped) {
eventBus.fireEvent(new ApplicationStoppedEvent());
}
- applicationRunning = running;
}
public boolean isApplicationRunning() {