diff --git a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/internal/ContentCopier.java b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/internal/ContentCopier.java index ed294dea85fa..c57fae5cc023 100644 --- a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/internal/ContentCopier.java +++ b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/internal/ContentCopier.java @@ -61,14 +61,7 @@ protected Action process() throws Throwable return Action.SCHEDULED; if (Content.Chunk.isFailure(current)) - { - if (current.isLast()) - throw current.getFailure(); - if (LOG.isDebugEnabled()) - LOG.debug("ignored transient failure", current.getFailure()); - succeeded(); - return Action.SCHEDULED; - } + throw current.getFailure(); sink.write(current.isLast(), current.getByteBuffer(), this); return Action.SCHEDULED; diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpChannelState.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpChannelState.java index fd7ed57e2e09..721a00ccf6cd 100644 --- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpChannelState.java +++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpChannelState.java @@ -365,17 +365,10 @@ public Runnable onIdleTimeout(TimeoutException t) Runnable invokeWriteFailure = _response.lockedFailWrite(t); // If demand was in process, then arrange for the next read to return the idle timeout, if no other error - // TODO to make IO timeouts transient, remove the invokeWriteFailure test below. - // Probably writes cannot be made transient as it will be unclear how much of the buffer has actually - // been written. So write timeouts might always be persistent... but then we should call the listener - // before calling lockedFailedWrite above. - if (invokeOnContentAvailable != null || invokeWriteFailure != null) + if (invokeOnContentAvailable != null) { - // TODO The chunk here should be last==false, so that IO timeout is a transient failure. - // However AsyncContentProducer has been written on the assumption of no transient - // failures, so it needs to be updated before we can make timeouts transients. - // See ServerTimeoutTest.testAsyncReadHttpIdleTimeoutOverridesIdleTimeout - _failure = Content.Chunk.from(t, true); + _failure = Content.Chunk.from(t, false); + System.err.println("failure chunk " + _failure); } // If there was an IO operation, just deliver the idle timeout via them