diff options
author | Artur Signell <artur@vaadin.com> | 2015-04-24 14:06:03 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2015-07-13 17:11:08 +0300 |
commit | d9ebf4ef71eea267bf1c1dbd52d89b04f12f6576 (patch) | |
tree | f8b63e4994e3d099f40fcd119c972de257d5a00b | |
parent | 2427aa54ae92942cd56cc514634e498070cce9d0 (diff) | |
download | vaadin-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.java | 7 |
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() { |