]> source.dussan.org Git - vaadin-framework.git/commitdiff
Allow all RPC calls for connectors enabled when receiving the message
authorArtur Signell <artur@vaadin.com>
Wed, 18 Apr 2012 08:33:49 +0000 (11:33 +0300)
committerArtur Signell <artur@vaadin.com>
Wed, 18 Apr 2012 20:09:09 +0000 (23:09 +0300)
src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java

index 6e2602ff9c7b3ffccfbd620f719aac8c1cb5f2e2..46d519c240b6d5c85a2fc71ae87344ae7d5d2034 100644 (file)
@@ -1393,8 +1393,17 @@ public abstract class AbstractCommunicationManager implements Serializable {
             final String burst) {
         boolean success = true;
         try {
+            Set<Connector> enabledConnectors = new HashSet<Connector>();
+
             List<MethodInvocation> invocations = parseInvocations(burst);
+            for (MethodInvocation invocation : invocations) {
+                final ClientConnector connector = getConnector(app,
+                        invocation.getConnectorId());
 
+                if (connector.isConnectorEnabled()) {
+                    enabledConnectors.add(connector);
+                }
+            }
             for (int i = 0; i < invocations.size(); i++) {
                 MethodInvocation invocation = invocations.get(i);
 
@@ -1412,7 +1421,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
                     continue;
                 }
 
-                if (!connector.isConnectorEnabled()) {
+                if (!enabledConnectors.contains(connector)) {
 
                     if (invocation instanceof LegacyChangeVariablesInvocation) {
                         LegacyChangeVariablesInvocation legacyInvocation = (LegacyChangeVariablesInvocation) invocation;