summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-09-18 14:19:29 +0300
committerArtur Signell <artur@vaadin.com>2012-09-18 14:24:57 +0300
commit959802d73e42904fc1fa3b2e35b7d49c74a36220 (patch)
treeb561a490efa3db3419727f58a87865d269f7696e
parentefb7fc901d0aaa0e87f529c8dc1a2442cfd3ea70 (diff)
downloadvaadin-framework-959802d73e42904fc1fa3b2e35b7d49c74a36220.tar.gz
vaadin-framework-959802d73e42904fc1fa3b2e35b7d49c74a36220.zip
Lock session when handling browser details request (#9656)
-rw-r--r--server/src/com/vaadin/server/AbstractCommunicationManager.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/src/com/vaadin/server/AbstractCommunicationManager.java b/server/src/com/vaadin/server/AbstractCommunicationManager.java
index 32800506a3..5832b144ec 100644
--- a/server/src/com/vaadin/server/AbstractCommunicationManager.java
+++ b/server/src/com/vaadin/server/AbstractCommunicationManager.java
@@ -2464,9 +2464,11 @@ public abstract class AbstractCommunicationManager implements Serializable {
public void handleBrowserDetailsRequest(WrappedRequest request,
WrappedResponse response, VaadinSession session) throws IOException {
- assert UI.getCurrent() == null;
+ session.getLock().lock();
try {
+ assert UI.getCurrent() == null;
+
CombinedRequest combinedRequest = new CombinedRequest(request);
response.setContentType("application/json; charset=UTF-8");
@@ -2495,6 +2497,8 @@ public abstract class AbstractCommunicationManager implements Serializable {
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
+ } finally {
+ session.getLock().unlock();
}
}