Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2015-05-29 02:27:12 +0000
committerGreg Wilkins2015-05-29 02:27:12 +0000
commit0db541889bae3767d2e10c7799451807136766ff (patch)
tree1998582c28c8c1df253850ff188446789d9375e7
parent57d0594e7394de63877fe60c3521627385e31a09 (diff)
downloadorg.eclipse.jetty.project-0db541889bae3767d2e10c7799451807136766ff.tar.gz
org.eclipse.jetty.project-0db541889bae3767d2e10c7799451807136766ff.tar.xz
org.eclipse.jetty.project-0db541889bae3767d2e10c7799451807136766ff.zip
468714 SelectorManager updateKey race without submit
-rw-r--r--jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java b/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java
index 6c2e35552c..e421571cb1 100644
--- a/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java
+++ b/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java
@@ -61,7 +61,7 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa
public static final String SUBMIT_KEY_UPDATES = "org.eclipse.jetty.io.SelectorManager.submitKeyUpdates";
public static final int DEFAULT_CONNECT_TIMEOUT = 15000;
protected static final Logger LOG = Log.getLogger(SelectorManager.class);
- private final static boolean __submitKeyUpdates = Boolean.valueOf(System.getProperty(SUBMIT_KEY_UPDATES, "false"));
+ private final static boolean __submitKeyUpdates = Boolean.valueOf(System.getProperty(SUBMIT_KEY_UPDATES, "true"));
private final Executor executor;
private final Scheduler scheduler;
@@ -451,7 +451,11 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa
}
else
{
- runChange(update);
+ // Run only 1 change at once
+ synchronized (this)
+ {
+ runChange(update);
+ }
if (_state.compareAndSet(State.SELECT, State.WAKEUP))
wakeup();
}

Back to the top