]> source.dussan.org Git - vaadin-framework.git/commitdiff
[merge from 6.7] Fixed #8580: After a UIDL request, hasActiveRequest was set to false...
authorAutomerge <automerge@vaadin.com>
Thu, 29 Mar 2012 17:06:16 +0000 (17:06 +0000)
committerAutomerge <automerge@vaadin.com>
Thu, 29 Mar 2012 17:06:16 +0000 (17:06 +0000)
svn changeset:23359/svn branch:6.8

src/com/vaadin/terminal/gwt/client/ApplicationConnection.java

index a05dc7d75861b3f75621916547d49b4652faefe9..dd998e760c65c29a55e4f7991962bfc74cd6033e 100644 (file)
@@ -737,6 +737,10 @@ public class ApplicationConnection {
     }
 
     protected void startRequest() {
+        if (hasActiveRequest) {
+            throw new IllegalStateException(
+                    "Trying to start a new request while another is active");
+        }
         hasActiveRequest = true;
         requestStartTime = new Date();
         // show initial throbber
@@ -761,11 +765,14 @@ public class ApplicationConnection {
     }
 
     protected void endRequest() {
+        if (!hasActiveRequest) {
+            throw new IllegalStateException("No active request");
+        }
+        hasActiveRequest = false;
         if (applicationRunning) {
             checkForPendingVariableBursts();
             runPostRequestHooks(configuration.getRootPanelId());
         }
-        hasActiveRequest = false;
         // deferring to avoid flickering
         Scheduler.get().scheduleDeferred(new Command() {
             public void execute() {