diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java index 2a2e0dac18b..bedc36ef842 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java @@ -162,6 +162,8 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo // we are not interested in further selecting _key.interestOps(0); + if (!_dispatched) + updateKey(); return; } diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectorManager.java b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectorManager.java index 21823c8297b..8c6db52fb60 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectorManager.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectorManager.java @@ -444,7 +444,7 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa // Stopped concurrently ? if (selector == null) return; - + // Make any key changes required Object change; int changes=_changes.size(); @@ -585,15 +585,6 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa // Log and dump some status _paused=true; LOG.warn("Selector {} is too busy, pausing!",this); - final SelectSet set = this; - SelectorManager.this.dispatch( - new Runnable(){ - public void run() - { - System.err.println(set+":\n"+set.dump()); - } - public String toString() {return "Dump-"+super.toString();} - }); } } } @@ -991,6 +982,16 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa dumpto.add(key.attachment()+" - - "); } } + + /* ------------------------------------------------------------ */ + public String toString() + { + String s=super.toString()+" "+SelectorManager.this.getState(); + Selector selector=_selector; + if (selector!=null && selector.isOpen()) + s+=",k="+selector.keys().size()+",s="+selector.selectedKeys().size(); + return s; + } } /* ------------------------------------------------------------ */