diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/AbstractConnection.java b/jetty-io/src/main/java/org/eclipse/jetty/io/AbstractConnection.java index 164bf4b248b..11c4b1a362c 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/AbstractConnection.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/AbstractConnection.java @@ -545,7 +545,7 @@ public abstract class AbstractConnection implements Connection @Override public String toString() { - return String.format("AC.ExReadCB@%x", AbstractConnection.this.hashCode()); + return String.format("AC.ReadCB@%x{%s}", AbstractConnection.this.hashCode(),AbstractConnection.this); } }; } diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/FillInterest.java b/jetty-io/src/main/java/org/eclipse/jetty/io/FillInterest.java index 6af94f59f9c..5460974e44a 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/FillInterest.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/FillInterest.java @@ -25,6 +25,8 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; import org.eclipse.jetty.util.Callback; +import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; /* ------------------------------------------------------------ */ @@ -35,6 +37,7 @@ import org.eclipse.jetty.util.Callback; */ public abstract class FillInterest { + private final static Logger LOG = Log.getLogger(FillInterest.class); private final AtomicReference _interested = new AtomicReference<>(null); /* ------------------------------------------------------------ */ @@ -56,7 +59,10 @@ public abstract class FillInterest throw new IllegalArgumentException(); if (!_interested.compareAndSet(null,callback)) + { + LOG.warn("Read pending for "+_interested.get()+" pervented "+callback); throw new ReadPendingException(); + } try { if (needsFill()) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java index e814110da68..faca50e73c5 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java @@ -237,7 +237,7 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http finally { setCurrentConnection(null); - if (!suspended && getEndPoint().isOpen()) + if (!suspended && getEndPoint().isOpen() && getEndPoint().getConnection()==this) { fillInterested(); }