summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2013-05-03 09:26:16 +0300
committerLeif Åstrand <leif@vaadin.com>2013-05-03 09:26:16 +0300
commit05ede5caa813203402ca78ecbbbce4e7def76d72 (patch)
tree9c4e22f2af5642412f65aac2c6fa414e230ded87
parent68d3f0ac04fb945f8f2ca2b60b75d65485f98f7a (diff)
downloadvaadin-framework-05ede5caa813203402ca78ecbbbce4e7def76d72.tar.gz
vaadin-framework-05ede5caa813203402ca78ecbbbce4e7def76d72.zip
Only complain about other session if it is locked (#11757)
Change-Id: I94ff6cecc52ae79724e45bb1c246401d9521a7cf
-rw-r--r--server/src/com/vaadin/server/VaadinService.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/com/vaadin/server/VaadinService.java b/server/src/com/vaadin/server/VaadinService.java
index 083bd4bedf..af0c280c19 100644
--- a/server/src/com/vaadin/server/VaadinService.java
+++ b/server/src/com/vaadin/server/VaadinService.java
@@ -1553,7 +1553,8 @@ public abstract class VaadinService implements Serializable {
*/
public static void verifyNoOtherSessionLocked(VaadinSession session) {
VaadinSession otherSession = VaadinSession.getCurrent();
- if (otherSession != null && otherSession != session) {
+ if (otherSession != null && otherSession != session
+ && otherSession.hasLock()) {
throw new IllegalStateException(
"Can't access session while another session is locked by the same thread. This restriction is intended to help avoid deadlocks.");
}