diff options
author | Leif Åstrand <leif@vaadin.com> | 2013-08-02 16:03:15 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-08-05 05:40:04 +0000 |
commit | 2ff71f623495995e83c71227630140f6609a13c4 (patch) | |
tree | d5cf2579e2b15348029617b864b2d0928d3750e1 /server/src | |
parent | 99c7d0b3cde116bf31b00bd31f62f9f4920b1762 (diff) | |
download | vaadin-framework-2ff71f623495995e83c71227630140f6609a13c4.tar.gz vaadin-framework-2ff71f623495995e83c71227630140f6609a13c4.zip |
Avoid infinite recursion when purging access queue (#12310)
Change-Id: Id5029f6606ce508c5746af4e0fa3078283f511bf
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/com/vaadin/server/VaadinSession.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/com/vaadin/server/VaadinSession.java b/server/src/com/vaadin/server/VaadinSession.java index 8de01e22bc..1f7a577a42 100644 --- a/server/src/com/vaadin/server/VaadinSession.java +++ b/server/src/com/vaadin/server/VaadinSession.java @@ -903,12 +903,14 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { */ public void unlock() { assert hasLock(); + boolean ultimateRelease = false; try { /* * Run pending tasks and push if the reentrant lock will actually be * released by this unlock() invocation. */ if (((ReentrantLock) getLockInstance()).getHoldCount() == 1) { + ultimateRelease = true; getService().runPendingAccessTasks(this); for (UI ui : getUIs()) { @@ -935,7 +937,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * actually released. This means that the queue should be purged again * if it is not empty after unlocking. */ - if (!getPendingAccessQueue().isEmpty()) { + if (ultimateRelease && !getPendingAccessQueue().isEmpty()) { getService().ensureAccessQueuePurged(this); } } |