浏览代码

Avoid infinite recursion when purging access queue (#12310)

Change-Id: Id5029f6606ce508c5746af4e0fa3078283f511bf
tags/7.1.2
Leif Åstrand 11 年前
父节点
当前提交
2ff71f6234
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      server/src/com/vaadin/server/VaadinSession.java

+ 3
- 1
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);
}
}

正在加载...
取消
保存