#10543 re-instate H3 fix as temporary
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
parent
d03fc25b9c
commit
e290ff9561
|
@ -528,6 +528,12 @@ public class HttpStreamOverHTTP3 implements HttpStream
|
|||
|
||||
public Runnable onFailure(Throwable failure)
|
||||
{
|
||||
try (AutoLock ignored = lock.lock())
|
||||
{
|
||||
if (chunk != null)
|
||||
chunk.release();
|
||||
chunk = Content.Chunk.from(failure, true);
|
||||
}
|
||||
return httpChannel.onFailure(failure);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -879,7 +879,7 @@ public class ForeignIncubatorQuicheConnection extends QuicheConnection
|
|||
try (AutoLock ignore = lock.lock())
|
||||
{
|
||||
if (quicheConn == null)
|
||||
return -1;
|
||||
throw new IOException("connection was released");
|
||||
|
||||
long read;
|
||||
try (ResourceScope scope = ResourceScope.newConfinedScope())
|
||||
|
@ -905,15 +905,10 @@ public class ForeignIncubatorQuicheConnection extends QuicheConnection
|
|||
}
|
||||
}
|
||||
|
||||
if (read == quiche_error.QUICHE_ERR_DONE)
|
||||
return isStreamFinished(streamId) ? -1 : 0;
|
||||
if (read < 0L)
|
||||
{
|
||||
if (isStreamFinished(streamId))
|
||||
return -1;
|
||||
else if (read == quiche_error.QUICHE_ERR_DONE)
|
||||
return 0;
|
||||
else
|
||||
throw new IOException("failed to read from stream " + streamId + "; quiche_err=" + quiche_error.errToString(read));
|
||||
}
|
||||
throw new IOException("failed to read from stream " + streamId + "; quiche_err=" + quiche_error.errToString(read));
|
||||
buffer.position((int)(buffer.position() + read));
|
||||
return (int)read;
|
||||
}
|
||||
|
|
|
@ -705,18 +705,13 @@ public class JnaQuicheConnection extends QuicheConnection
|
|||
try (AutoLock ignore = lock.lock())
|
||||
{
|
||||
if (quicheConn == null)
|
||||
return -1;
|
||||
throw new IOException("connection was released");
|
||||
bool_pointer fin = new bool_pointer();
|
||||
int read = LibQuiche.INSTANCE.quiche_conn_stream_recv(quicheConn, new uint64_t(streamId), buffer, new size_t(buffer.remaining()), fin).intValue();
|
||||
if (read == quiche_error.QUICHE_ERR_DONE)
|
||||
return isStreamFinished(streamId) ? -1 : 0;
|
||||
if (read < 0L)
|
||||
{
|
||||
if (isStreamFinished(streamId))
|
||||
return -1;
|
||||
else if (read == quiche_error.QUICHE_ERR_DONE)
|
||||
return 0;
|
||||
else
|
||||
throw new IOException("failed to read from stream " + streamId + "; quiche_err=" + quiche_error.errToString(read));
|
||||
}
|
||||
throw new IOException("failed to read from stream " + streamId + "; quiche_err=" + quiche_error.errToString(read));
|
||||
buffer.position(buffer.position() + read);
|
||||
return read;
|
||||
}
|
||||
|
|
|
@ -1202,8 +1202,9 @@ public class HttpClientStreamTest extends AbstractTest
|
|||
@MethodSource("transports")
|
||||
@Tag("DisableLeakTracking:server:H2")
|
||||
@Tag("DisableLeakTracking:server:H2C")
|
||||
@Tag("DisableLeakTracking:server:H3")
|
||||
@Tag("DisableLeakTracking:server:FCGI")
|
||||
public void testHttpStreamConsumeAvailableUponClientTimeout(Transport transport) throws Exception
|
||||
public void testHttpStreamConsumeAvailableUponClientAbort(Transport transport) throws Exception
|
||||
{
|
||||
AtomicReference<org.eclipse.jetty.client.Request> clientRequestRef = new AtomicReference<>();
|
||||
|
||||
|
|
Loading…
Reference in New Issue